Installation notes for MySQL source code under Fedora 8

Source: Internet
Author: User
Install the MySQL source code in A8 ora8: blog.sina.com.cnsblog_48c95a424100e7eo.html; comment: the system development plan has changed! Discard PostgreSQL! Embrace MySQL! Of course, the premise is that BerkeleyDB is still supported as the MySQL version of the storage engine. MySQL version 5.1.12 has officially removed the BDB from the Database Engine list.

Fedora 8 MySQL source installation notes Source: http://blog.sina.com.cn/s/blog_48c95a190100e7eo.html evaluation: System Development Plan change! Discard PostgreSQL! Embrace MySQL! Of course, the premise is that the MySQL version of Berkeley DB is still supported as the storage engine. MySQL version 5.1.12 has officially removed the BDB from the Database Engine list.

Installation notes for MySQL source code under Fedora 8
Source: http://blog.sina.com.cn/s/blog_48c95a190100e7eo.html
Rating:
The system development plan has changed! Discard PostgreSQL! Embrace MySQL! Of course, the premise is that the MySQL version still supports Berkeley DB as the storage engine. MySQL version 5.1.12 has officially removed BDB from the Database Engine list, although MySQL claims that this has nothing to do with Oracle's acquisition of Sleepycat, the Oracle statement is that the BDB development team in the company requires the cancellation of support, so it is not clear which side is to be honest. Later, we began to worry that MySQL would also abandon InnoDB, because Oracle, the wealthy Oracle, also acquired Innobase, although Oracle declared that it would still support InnoDB, however, the falcon of InnoDB added to MySQL 6.0 clearly shows that MySQL has started its preparations. After all, I am afraid that Oracle will pay a base salary, therefore, it is very necessary to leave a path for yourself at the WTI cave. All right, let's talk less about it and get down to the truth. My MySQL version is 5.0.83. When downloading it on the MySQl official website, be sure to download the source code version instead of the binary installation version. The installation steps are as follows:
1、decompress mysql-5.0.83.tar.gz
Tar-zxvf mysql-5.0.83.tar.gz
2. Create a new directory/usr/local/mysql to serve as the installation directory of MySQL, and then enter the directory of the mysql-5.0.83 just extracted for configuration: install it in/usr/local/mysql and use gbk. For other parameters, see related documents.
./Configure -- prefix =/usr/local/mysql -- with-charset = gbk
3. Compile and install
Make
Make install
4. Create users and groups
Groupadd mysql
Useradd-g mysql
5. Go to the MySQL installation directory/usr/local/mysql, create the var directory and copy./share/mysql/my-medium.cnf to the mysql directory and rename it my. cnf.
Mkdir var
Mv share/mysql/my-medium.cnf my. cnf
6. Configure my. cnf and open my. cnf in the editor to find the log-bin = mysql-bin line and comment it out.
# Log-bin = mysql-bin
7. Install the database
Bin/mysql_install_db -- user = mysql
8. Set directory permission attributes
Chown-R root.
Chown-R mysql/usr/local/mysql/var
Chgrp-R mysql.
9. Start MySQL
Bin/mysql_safe -- user = mysql &
10. Enter the database
Bin/mysql
If the following information is displayed on the screen, the database is successfully accessed:
Welcome to the MySQL monitor. Commands end with; or \ g.
Your MySQL connection id is 1
Server version: 5.0.83 Source distribution

Type 'help; 'or' \ H' for help. type' \ C' to clear the current input statement.

Mysql>
11. Simple operation test
Mysql> create database mydb;
Query OK, 1 row affected (0.01 sec)
Mysql> show databases;
+ -------------------- +
| Database |
+ -------------------- +
| Information_schema |
| Mydb |
| Mysql |
| Test |
+ -------------------- +
4 rows in set (0.01 sec)
Mysql> drop database mydb;
Query OK, 0 rows affected (0.00 sec)
Mysql> show databases;
+ -------------------- +
| Database |
+ -------------------- +
| Information_schema |
| Mysql |
| Test |
+ -------------------- +
3 rows in set (0.00 sec)
Mysql> use test;
Database changed
Mysql> show tables;
Empty set (0.00 sec)
Mysql> create table mytable (
-> Id int, name varchar (20)
-> );
Query OK, 0 rows affected (0.00 sec)

Mysql> insert into mytable values (5601083, 'zhichao Liang ');
Query OK, 1 row affected (0.01 sec)

Mysql> select * from mytable;
+ --------- + --------------- +
| Id | name |
+ --------- + --------------- +
| 5601083 | Zhichao Liang |
+ --------- + --------------- +
1 row in set (0.00 sec)

The test is complete. MySQL has been successfully installed and can be run!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.