More stuff I tend to forget...
- Launch the MySQL daemon
-
% sudo /usr/local/bin/mysqld_safe [type ^Z] % bg
- Stop the MySQL daemon
-
% mysqladmin shutdown -p [type in the password when prompted] % mysqld --skip-grant-tables
- Change MySQL's root password
-
% mysqladmin -u root -p password NEW_PASSWORD [type in the old password when prompted]
- Backup a MySQL database
-
% mysqldump --opt -uUSERNAME -pPASSWORD -h HOSTNAME DBNAME > db.txt % zip db.zip db.txtIf you can't remember USERNAME, PASSWORD, HOSTNAME, or DBNAME, you can find them in (for example) your WordPress
wp-config.phpfile. - During installation phpMyAdmin says "#2002 — The server is not responding (or the local MySQL server's socket is not correctly configured)":
-
I don't claim to understand this one at all. But some combination of these seem to do the trick:
-
Log on as root and create the file
/etc/my.cnf. Insert these lines into the file:[client] socket=/var/mysql/mysql.sock [mysqld] socket=/var/mysql/mysql.sock - Look at
/etc/php.iniand make sure the line concerning "Default socket name for local MySQL connects". There should be nothing after the equals sign:mysql.default_socket = - Execute phpinfo() and examine all the references to
mysql. Look for any weirdnesses and inconsistencies there. Make sure the mysql socket names and directory paths all make sense with your php installation.
-
Log on as root and create the file
- Check your PHP configuration
- Create a text file containing the following single line of code:
<?php phpinfo() ?>Name the file something useful like
phpinfo.phpand load it into your browser. - Handy references