1. Installing the MySQLrpm file in Linux is a software installation package developed by RedHat. rpm frees Linux from complicated procedures when installing the software package. This command is often used during installation.
1. Installing MySQL rpm in Linux is a software installation package developed by Red Hat. rpm frees Linux from complicated procedures when installing software packages. This command is often used during installation.
1. Install MySQL in Linux
The rpm file is a software installation package developed by Red Hat. rpm frees Linux from complicated procedures when installing software packages. The frequently used parameter of this command during installation is-ivh, where I indicates that the specified rmp package will be installed, and V indicates the detailed information during installation, h indicates that the "#" symbol appears during the installation to display the current installation process. This symbol will not stop until the installation is complete.
1) install the server
Run the following command in the directory with two rmp files:
[Root @ test1 local] # rpm-ivh MySQL-server-5.0.9-0.i386.rpm
2) install the client
Run the following command:
[Root @ test1 local] # rpm-ivh MySQL-client-5.0.9-0.i386.rpm
2. log on to MySQL
The command used to log on to MySQL is mysql. the syntax of mysql is as follows:
Mysql [-u username] [-h host] [-p [password] [dbname]
Username and password are the username and password of MySQL respectively. The initial management account of mysql is root, and there is no password. Note: This root user is not a Linux system user. The default MySQL user is root. Because there is no password at first, you only need to type mysql for the first time.
[Root @ test1 local] # mysql
Welcome to the MySQL monitor. Commands end with; or \ g.
Your MySQL connection id is 1 to server version: 4.0.16-standard
Type 'help; 'or' \ H' for help. Type '\ C' to clear the buffer.
Mysql>
The prompt "mysql>" appears. Congratulations! The installation is successful!
The logon format after the password is added is as follows:
Mysql-u root-p
Enter password: (Enter the password)
-U is followed by the user name.-p requires the password. Press enter and enter the password at the Enter password.
Note: This mysql file is located in the/usr/bin directory. It is not a file with the Startup file/etc/init. d/mysql described later.