MySQL Commands
Back to Akasha Mainpage
Download MySQL
www.MySQL.com
Start server = (as root) cd /usr/local/mysql bin/mysqld
Stop server = (as root) cd /usr/local/mysql bin/mysqladmin -u root -p shutdown
Start monitor = cd /usr/local/mysql bin/mysql --user=root(or mysql) -p
Stop monitor = QUIT
SQL
SHOW DATABASES;
USE
databasename;
Troubleshooting
Debian Package for Perl = libdbd-mysql-perl
Install (as root) with apt-get install libdbd-mysql-perl
Perl mod install test for DBI = perl -MDBI -e 1;
Perl install test for mysql driver = perl -MDBD::mysql -e 1;
The mysql driver on Debian is kept at /usr/lib/perl5/Mysql.pm & /usr/lib/perl5/DBD/mysql.pm
Scripts from the book "Managing and Using MySQL" are at
O'Reilly Examples
There is an error in the 2nd edition on page 151, the password for andy = ALpswd NOT ALpaswd
Error "can't connect to local MySQL /var/run/mysqld/mysqld.sock" solution =
(from / as root) find .|grep mysqld.sock
if found (possibly /tmp/mysql.sock)
ln -s /tmp/mysql.sock to /var/run/mysqld/mysqld.sock