INSTALL MYSQL SERVER Ubuntu

Here it is a basic command to install MySQL on your server. First thing first, if you disabled root login following our previous guide, then execute this command first. Otherwise you don’t need to..
1. sudo su
You may also need to update and upgrade apt if you didn’t do it yet.
1. apt-get update
2. apt-get upgrade
Then here it is the main command to install MySQL:
1. apt-get install mysql-server

install mysql

If you are using Apache2 and PHP5, you can also use following command instead of default one above:
1. apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql
If you are using another webserver you can also try to also install MySQL Tuner mod but obviously you’ll need to adjust some settings.
1. apt-get install mysql-server mysqltuner
Once you’ve executed one of above commands, you’ll be asked to enter / define password for user root. Enter the password twice.

If MySQL didn’t ask to enter password. What should I do?
A: You can run another command to enter new password


1. mysqladmin -u root password new_password

change “new_password” with your own password.

No comments:

Post a Comment