mysql

mysql server restart

My mysqld runs on Ubuntu Hardy and after replacing the complete mysql data with a dump from another server the "/etc/init.d/mysql stop" command fails, because the system administration account doesn't work anymore. So I had to recreate it again:
GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;
The password can be obtained from /etc/mysql/debian.cnf.

MySQL install

After installing the Suse 9 rpm, execute the following commands:

sudo /usr/bin/mysql_install_db
(Creating default databases & permissions. Apparently the same can be done by "sudo rcmysql start")

sudo /usr/bin/mysqld_safe --user=mysql &
(Start the server for the first time)
REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! This is done with:

/usr/bin/mysqladmin -u root password 'new-password' /usr/bin/mysqladmin -u root -h hostname password 'new-password'

Pages