sudo apt-get install mysql-server
If this is a clean installation of MySQL, it will prompt you to set your root password. Make sure that you type it correctly, as it will only ask you once. If you've upgraded, or installed MySQL before, it may not prompt you for a password.
Testing MySQL
Once MySQL is finished installing, we can test MySQL by connecting to it, using...
mysql -uroot -pyourpassword
After filling in your own password after -p, you'll see a MySQL prompt. That's it, you're done! You can type 'exit' to get out of MySQL.
Installing phpMyAdmin
if you want to install phpMyAdmin to administrate your MySQL, you can type...
sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin
Again, like MySQL, if this is a clean installation, it will ask you to choose a webserver to configure automatically. If you have had phpMyAdmin installed before, it won't prompt you to choose. You can use the space bar to select apache2 and then enter.
Once that's finished, restart it one more time and enter the webserver as apache2.
Once that's finished, restart it one more time and enter the webserver as apache2.
No comments:
Post a Comment