When running the command sudoapt-getinstallmysql-server5.1 installation in ubuntu, I did not prompt me to enter the mysql password and other information, but when the installation is good
When executing the sudo apt-get install mysql-server5.1 installation command in ubuntu, I was not prompted to enter the mysql password and other information, but when it is installed
When executing the sudo apt-get install mysql-server5.1 installation command in Ubuntu, I was not prompted to enter the mysql password and other information, however, after installation, mysql can be directly entered in the terminal. Although mysql can be accessed, I do not know the mysql password, therefore, the mysql installed at this time is equivalent to not being installed, because the mysql database cannot be operated by a program (because the password of mysql Data is required for database operations ),, there are two methods to solve the mysql password initialization in ubuntu:
(1) Open the/etc/mysql/debian. cnf file, which contains the username and password that the system assigns to us by default. With this password, you can directly operate on mysql. However, this password is generally quite strange and very long.
(2) After Entering mysql, modify the mysql password: This method is better. The specific operation is as follows: set password for 'root' @ 'localhost' = password ('yourpass'); after modification, mysql can be operated normally.