MySuQL (MySQL) setup steps on Slackware

This is primarily for my own reference. I hate MySuQL.

[15:56:54] 1 myke@spy:~$ cat setup-mysql-slackware.txt
cd /var/lib/
chown -R mysql mysql mysql
chgrp -R root mysql mysql
su mysql
mysql_install_db
/usr/bin/mysqld_safe –user=mysql &
exit
mysqladmin -u root status
[15:56:57] 0 myke@spy:~$

CREATE DATABASE xxx;
USE xxx;
GRANT ALL
ON xxx.*
TO ‘myuser’@’%’
IDENTIFIED BY ‘mypassword’; — network from anywhere
GRANT ALL
ON xxx.*
TO ‘myuser’@’localhost’
IDENTIFIED BY ‘mypassword’; — local CLI logins
GRANT ALL
ON xxx.*
TO ‘myuser’@’localhost.localdomain’
IDENTIFIED BY ‘mypassword’; — apparently you need this for JDBC

[16:10:52] 1 myke@spy:~$ mysql -u myuser -p xxx
Enter password:
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 15 to server version: 4.1.14

Type ‘help;’ or ‘h’ for help. Type ‘c’ to clear the buffer.

mysql> –the ‘-p’ is required on the command line

Posted in Uncategorized