# CD / usr / src # tar -zvxf mysql-3.22.25-pc-linux-gnu-i686.tar.gz (generated mysql-3.22.25-pc-linux-gnu-i686 directory) # cd mysql-3.22. 25-PC-Linux-GNU-I686 # ./configure --prefix = / usr / local / mysql (where parameter settings "# make # make install Note When running configure, set Mysql installation destination path For / usr / local / mysql, the path is still used during successive installation. Then, establish the original database: # Scripts / mysql_install_db This command will build two databases in / usr / local / mysql / var / down, where the former is mysql's permission management database, the latter is to make you practice use. Note: If you have installed fruit MySQL before, the initial database already exists and does not need to be reinstalled. Finally, start mysql: # cd / usr / local / mysql / bin # ./safe_mysqld & if you want to automatically run the database service when the machine is started, you can add the above start command to /etc/rc.d/rc. Local file. Now, MySQL has already run and wait for your data processing command! However, be careful: You have not set a password for your root administrator, and anyone can modify your database as you want! If you don't believe, make the following exercises (assuming our current directory is / usr / local / mysql / bin): Try to log in with any user and run: $ ./mysql -u root Instant to "MySQL>" End software prompt and perform any data processing operation without any password; this shows that mysql administrator "root" account can be different from your Unix account. In order to add the ROOT account, execute: # ./mysqladmin -u root password 'new password' to perform: $ ./mysql -u root again, the system will be prompted to enter the password, and the password is incorrectly refuses access. In fact, even if you are a root user, if you don't clearly specify your password, the system is still still rejected: # ./mysql -u root or # ./mysql system Response: Error 1045: Access Denied for user: 'root @ localhost' (USING Password: No) Only uses the -p parameters, clearly explains that you want to use the password, the system will prompt you to enter your password, and enter the correct time to enter: # ./mysql -u root -p password: ** ****** (Enter password) Welcome to the mysql monitor. Commands end with; or g. Your MySQL Connection ID is 33 To Server Version: 3.22.25
Type 'Help' for Help.
MySQL>