First of all update your system if you need
1) sudo apt-get update
2) sudo apt-get upgrade
You’ll then be presented with the MySQL monitor prompt:
1) sudo apt-get update
2) sudo apt-get upgrade
Install MySQL
1)sudo apt-get install mysql-server
During the installation process, you will be prompted to set a password for the MySQL root user.
Choose a strong password and keep it in a safe place for future reference.
MySQL Server
1)sudo mysql_secure_installation |
You will be given the choice to change the MySQL root password, remove
anonymous user accounts, disable root logins outside of localhost, and
remove test databases. It is recommended that you answer yes to these
options.
Root Login
To log in to MySQL as the root user:
1) mysql -u root -p
When prompted, enter the root password you assigned when the
mysql_secure_installation
.1 2 3 4 5 6 7 | Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.0.45 Source distribution Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> |
No comments:
Post a Comment