Using MySQL with Spine
Create a Database in mysql, e.g. spine (consult the mysql manpages for extra options):
bash# mysql mysql -p
in the mysql shell :
mysql> create database spine;
Then exit the shell and import the structure:
bash# mysql spine -p <mysql3-struct.sql
Once the database structure is set-up, insert the data:
bash# mysql spine -p <mysql3-data.sql
Database permissions
might have to be defined. The following SQL statement creates a user in MySQL:
GRANT ALL PRIVILEGES ON $database.* TO '$username'@'localhost' IDENTIFIED BY '$password';
The following variables are used:
- $database : The database name. This value is used in the httpd.conf 'dbname' value.
- $username : The username. This value is used in the httpd.conf 'dbuser' value.
- $password : The password. This value is used in the httpd.conf 'dbpwd' value.
In the MySQL shell, create users as follows:
root@spine.sourceforge.net:~ # mysql -p mysql
Enter password:
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 119 to server version: 4.0.24_Debian-10ubuntu2-log
Type 'help;' or 'h' for help. Type 'c' to clear the buffer.
mysql> GRANT ALL PRIVILEGES ON spine.* TO 'spine'@'localhost' IDENTIFIED BY 'spine';
Query OK, 0 rows affected (0.00 sec)
mysql>