MySQL for all platforms: MySQL download. Pick the version of MySQL Community Server you need and the corresponding platform.
install MySQL on Linux/unix
The following RPM packages are recommended for installing Mysql,mysql AB on Linux platforms using the RPM package:
- MySQL -MySQL server. You need this option unless you only want to connect to a MySQL server that is running on another machine.
- mysql-client -MySQL client program for connecting and operating the MySQL server.
- Mysql-devel -Libraries and include files, if you want to compile other MySQL clients, such as Perl modules, you need to install the RPM package.
- mysql-shared -The package contains some languages and applications that require dynamic loading of shared libraries (libmysqlclient.so*), using MySQL.
- mysql-bench -Baseline and performance testing tools for MySQL database servers.
The following example of installing MySQL RMP is on the SuSE Linux system, which is also suitable for other RPM-enabled Linux systems, such as Centos.
The installation steps are as follows:
Log in to your Linux system using the root user.
Download the MySQL RPM package for: MySQL download.
Perform the MySQL installation with the following command, RPM package for the RPM package you downloaded:
[[email protected]]# rpm -i MySQL-5.0.9-0.i386.rpm
The process of installing the MySQL server above will create a MySQL user and create a MySQL profile my.cnf.
You can find all of the MySQL-related binaries in/usr/bin and/usr/sbin. All data tables and databases will be created in the/var/lib/mysql directory.
Here are some of the installation procedures for MySQL optional packages that you can install according to your needs:
[[email protected]]# rpm -i MySQL-client-5.0.9-0.i386.rpm[[email protected]]# rpm -i MySQL-devel-5.0.9-0.i386.rpm[[email protected]]# rpm -i MySQL-shared-5.0.9-0.i386.rpm[[email protected]]# rpm -i MySQL-bench-5.0.9-0.i386.rpm
install MySQL on window
Installing MySQL on Windows is relatively straightforward, and you only need to download the MySQL installation package from the Windows version of MySQL download and unzip the installation package.
Double click on the Setup.exe file, next you only need to install the default configuration click "Next", by default, the installation information will be in the C:\mysql directory.
Next you can enter "cmd" command in the search box by "start" = "Switch to the C:\mysql\bin directory at the command prompt and enter the command:
--console
If the installation succeeds the above command will output some MySQL boot and innodb information.
Verifying MySQL installation
After the successful installation of MySQL, some basic tables will be initialized, after the server starts, you can verify that MySQL is working properly with simple tests.
Use the Mysqladmin tool to get the server status:
Use the mysqladmin command to check the version of the server, on Linux the binary is located on the/usr/bin on Linux, and on the window the binary file is located in C:\mysql\bin.
--version
On Linux, the command outputs the following results, based on your system information:
mysqladmin Ver 8.23 Distrib 5.0.9-0, for redhat-linux-gnu on i386
If you do not enter any information after the above command is executed, your MySQL is not installed successfully.
execute a simple SQL command using MySQL client
You can use MySQL command to connect to MySQL server on MySQL client (MySQL clients), by default the MySQL server password is empty, so this instance does not need to enter a password.
The command is as follows:
[[email protected]]# mysql
The above command will output the mysql> prompt, which means that you have successfully connected to the MySQL server and you can execute the SQL command at the mysql> prompt:
mysql> SHOW databases;+----------+| Database |+----------+| MySQL | | Test |+----------+2 rows in Set (0.13 sec)
MySQL installed after the need to do
After the MySQL installation is successful, the default root user password is empty and you can use the following command to create the root user's password:
[[email protected]]# mysqladmin -u root password "new_password";
Now you can connect to the MySQL server with the following command:
[[email protected]]# mysql -u root -pEnter password:*******
Note: When you enter a password, the password is not displayed, you can enter it correctly.
start MySQL on Linux system startup
If you need to start the MySQL server when the Linux system starts, you need to add the following command to the/etc/rc.local file:
start
Again, you need to add the mysqld binaries to the/etc/init.d/directory.
Original address: http://www.manongjc.com/mysql/mysql_install.html
MySQL Related reading:
MySQL ORD () function and ASCII () function usage analysis
MySQL ORD () function Use example Introduction
The MySQL ASCII () function returns the ASCII code value of the character
MySQL TRUNCATE () function Use instance
MySQL sign (x) determines whether the number x is positive or negative or zero
MySQL Installation Method