Fedora16 install Mysql1, download MySQL Installation File install MySQL requires the following two files: MySQL-client-5.1.55-1.glibc23.i386.rpmMySQL-server-5.1.55-1.glibc23.i386.rpm: http://mirrors.sohu.com/mysql/mysql-5.1/can use :yuminstall
Install Mysql under Fedora 16
1. Download the MySQL Installation File
The following two files are required to install MySQL:
MySQL-client-5.1.55-1.glibc23.i386.rpm
MySQL-server-5.1.55-1.glibc23.i386.rpm
For: http://mirrors.sohu.com/mysql/MySQL-5.1/
You can use:
Install yum install mysql-server
2. Install MySQL
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 @ www.linuxidc.com local] # rpm-ivh MySQL-server-5.1.55-1.glibc23.i386.rpm
Reminder:
If the following
Error: Failed dependencies:
Perl (DBI) is needed by MySQL-server-5.1.16-0.glibc23.i386
Please use
Install yum install perl-DBI. Of course, you need to try different releases.
The following information is displayed.
Warning: MySQL-server-5.1.55-1.glibc23.i386.rpm
Signature: NOKEY, key ID 5072e1f5
Preparing... ######################################## ### [100%]
1: mySQL-server ##################################### ###### [100%]
...... (Omitted)
/Usr/bin/mysqladmin-u root password 'new-password'
/Usr/bin/mysqladmin-u root-h test1 password 'new-password'
...... (Omitted)
Starting mysqld daemon with databases from/var/lib/mysql
If the preceding information is displayed, the Server installation is complete. Run netstat to check whether the Mysql port is opened. If yes, the service is started and the installation is successful. The default Mysql port is 3306.
[Root @ www.linuxidc.com local] # netstat-nat
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
Tcp 0 0 0.0.0.0: 3306 0.0.0.0: * LISTEN
The above shows that the MySQL service has been started.
2) install the client
Run the following command:
[Root @ www.linuxidc.com local] # rpm-ivh MySQL-client-5.1.55-1.glibc23.i386.rpm
Warning: MySQL-client-5.1.55-1.glibc23.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5
Preparing... ######################################## ### [100%]
1: mySQL-client ##################################### ###### [100%]
The installation is complete.
Use the following command to connect to mysql and test whether the connection is successful.
3. 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 @ www.linuxidc.com 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.
In Linux, MYSQL sets the password and accesses the database:
Set the mysql Database Password [root @ localhost ~] # Mysqladmin-u root password "password"
Command for accessing mysql database: [root @ localhost ~] # Mysql-u root-p → press enter to enter the password
The default information for installing and using mysql with rpm is as follows:
1) database directory/var/lib/mysql/
2) configuration file/usr/share/mysql (mysql. server command and configuration file)
3) related commands/usr/bin/(mysqladmin mysqldump)
4) Start the script/etc/rc. d/init. d/
5) The default port is 3306.
For more information about Fedora, see Fedora topics page http://www.linuxidc.com/topicnews.aspx? Tid = 5