1.fedora17system and mysql-5.1.58.tar.gz download linux system redhatfedora17Gonme system: download.fedoraproject.orgpubfedoralinuxreleases17Livei686Fedora-17-i686-Live-Desktop.isomysql-5.1.58.tar.gz download. csdn. n
1.fedora17system and mysql-5.1.58.tar.gz download linux system redhat fedora17 Gonme system: http://download.fedoraproject.org/pub/fedora/linux/releases/17/Live/i686/Fedora-17-i686-Live-Desktop.iso mysql-5.1.58.tar.gz download: http://download.csdn.n
1.fedora17system and mysql-5.1.58.tar.gz download
Linux redhat fedora17 Gonme
System:Http://download.fedoraproject.org/pub/fedora/linux/releases/17/Live/i686/Fedora-17-i686-Live-Desktop.iso
Download mysql-5.1.58.tar.gz:Http://download.csdn.net/download/monster1/4565198
All of the following operations must use the root user
Switch to the root user:
# Su
2. Create a user and user group
# Groupadd mysql
# Useradd-g mysql
3. install necessary software. skip this step if it is already installed.
Install the C compiler:
# Yum-y install gcc
Install the C ++ Compiler:
# Yum-y install gcc-c ++
Install ncurses
# Yum-y install ncurses-devel
If not found
# Yum list | grep ncurses
Select
# Yum instal ncurses-devel.XX.XX
Install libtool
# Yum-y install libtool
# Autoreconf -- force -- install
# Libtoolize -- automake -- force
# Automake -- force -- add-missing
4.install mysql-5.1.58.tar.gz
Create a mysql directory
# Mkdir/usr/local/mysql
Decompress the file to the current directory.
# Tar-xzvf mysql-5.1.58.tar.gz
Move files to/usr/src/mysql
# Music mysql-5.1.58/usr/src/mysql
To the mysql directory/
# Cd/usr/src/mysql
Configure mysql
#./Configure -- prefix =/usr/local/mysql
An error will be reported during configuration:/usr/bin/rm: cannot remove 'libtoolt': No such file or directory
# Vi configure
Find external file
Comment out $ RM "$ your file"
Release save: wq
Re #./configure -- prefix =/usr/local/mysql
# Make
# Make install
5. Set root permissions for the mysql directory
# Cd/usr/local
# Chown-R mysql: mysql
6. Initial Data Installation
# Cd/usr/local/mysql/bin
#./Mysql_install_db -- user = mysql
After installation, mysql and test files are generated under/usr/local/mysql/var/. You need to set permissions.
# Cd/usr/local
# Chown-R mysql: mysql
#./Mysqld_safe -- user = mysql
Log on to mysql
#./Mysql-u root-p
The following is OK.
Mysql>
7. Run the following command to start, stop, and restart the service.
# Cd/usr/local/mysql/share/mysql
Start
#./Mysql. server start
Stop
#./Mysql. server stop
Restart
#./Mysql. server restart
8. Remote Access to mysql settings
Mysql can only be accessed from the local machine by default. If you need remote access from other machines, you need to set it.
Step 1: Add a user for remote login.
Mysql> grant all privileges on *. * TO 'test' @ '% 'identified BY 'test' with grant option;
※: The user name is test and the password is test. "%" indicates that all machines can access the database and the password is valid after mySql is restarted.
Step 2: After adding the user, you can use commands on the local machine to test. If you log on to mySql successfully, set OK.
Mysql-h <自己机器的ip> -U myuser-p
Step 3: Most importantly, you will find that you can connect to mySql on this machine. However, if you use the same method on other machines
"Can't connect to MySQL server on '9. 186.100.178 '(10065)" error. Cause Analysis: firewall.
Set the firewall using the following method: open the file/etc/sysconfig/iptables and add one before the last one:
-A RH-Firewall-1-INPUT-m state-state NEW-m tcp-p tcp-dport 3306-j ACCEPT.
The next start will take effect
You can also directly disable the firewall:/etc/init. d/iptables-F
Now, you can access the database with the MySql client on another machine. The login method is "mysql-h 192.168.1.3-u myuser-p ".
However, if you are always using this console for better management, it is recommended that you use some management software for better management. I am using HeidiSQL and very good software.
9. Eliminate case sensitivity
Edit/etc/my. cnf
Append under [mysqld]
Lower_case_table_names = 1
Restart mysql
10. mysql source code installation is now complete