MySQL on Ubuntu Linux 8
posted by Jake on
Almost any interesting application nowadays uses a database to store its goodies. One of the most popular is the wildly-successful and generally good-looking MySQL database. Hopefully it stays true to its core (and free!) now that Sun has acquired it. Here's a tidbit on how to get it running on Ubuntu.
Almost any interesting application nowadays uses a database to store its goodies. One of the most popular is the wildly-successful and generally good-looking MySQL database. Hopefully it stays true to its core (and free!) now that Sun has acquired it. Here's a tidbit on how to get it running on Ubuntu.
This was my first step:
apt-get install mysql-client-5.0
Without installing and starting server, you'll get this:
MySQL Error Nr. 2002 Can't conect to local MySQL server through socket /var/lib/mysql/mysql.sock (2)
Forums explaining how to resolve this error are varied in their response (apparently sometimes this is an issue after upgrading database versions), but none of them addressed the most simple test, which turns out to be the solution: Install the server!
apt-get install mysql-server-5.0
You'll be prompted for a root password for mysql-server, and it'll start up the server automagically.
Enter your mysql world by typing:
mysql
And, interestingly enough, to exit, type:
exit
"Bye"
Oh, by the way... there are some other GUI interface tools for your newly installed mysql database that could be helpful if you don't remember all your sql syntax:
sudo apt-get install mysql-admin; sudo apt-get install mysql-query-browser