It's already midnight, and May Day is boring.
You can't sleep. You can install a virtual machine on your computer. Then, you can build a php environment on the virtual machine.
First, install MYSQL. I found many problems .. I will try again later.
This section describes how to install the MySQL source code in linux. If you are interested in the actual manual Installation Process of the MySQL source code in linux, you may wish to browse the following articles.
Bytes
2. Decompress tar -xvfMySQL-5.0.87.tar.gz
3. Enter MySQL-5.0.87
4. Check the environment and specify the installation directory:./configure -- prefix =/usr/local/MySQL
5. Compile: make
6. install: sudo make install
7. configuration is required during installation of MySQL source code in linux. First, you can see the following directory after installation:
Run the following command in share/MySQL: ls-l | grepmy-
All MySQL configuration files are displayed. select one of them as needed and copy them to/etc and name them my. cnf.
/Etc/my. cnf is the path of the configuration file read by MySQL by default.
8. Modify the write permission of var. This is the location where MySQL database data files are stored, because the background program running MySQL by the current user may not have the write permission for this directory.
Chmod 777./var-r
9. configure system environment variables so that MySQL programs can be directly executed.
The system environment variables are stored in/etc/profile, and the user's environment variables are stored in. bashrc under the user's root directory.
/Etc/profile configuration:
10. initialize MySQLd and execute MySQL_install_db.
11. directly call mysqld_safe & start mysql because environment variables have been configured before.
12. directly access MySQL Command Line Control. The default logon mode is the current user name. The default root mode has no password.
13. Set the root password: MySQLadmin-u rootpassword '123'
14. Log On As root: MySQL-uroot-p
15. Set remote database logon. After a user is created, the user can only log on locally by default.
Change the permitted logon address of the kuncai user to any address, but not local. That is to say, the kuncai user cannot log on locally and can only log on remotely.
Only the root user can execute this statement. Therefore, you must first log on to the local database as the root user.
16. Stop mysql: mysqladminshutdown
This refresh cache statement takes effect. The above content is an introduction to the installation of manual MySQL source code in linux. I hope you will have some gains.
1. Configure the startup Service
/Sbin/chkconfig httpd on [set the startup of the httpd service on the apache server]
/Sbin/chkconfig-add mysqld [add mysql service to service list]
/Sbin/chkconfig mysqld on [set mysql Service Startup]
/Sbin/service httpd start [start the httpd service, which has nothing to do with startup]
/Sbin/service mysqld start [start mysql service, irrelevant to startup]
2. Set the password of the root account of the mysql database. The default initialization password is null ~~~
Mysqladmin-u root password 'new-password' [enter the password in quotation marks]
3. Make mysql database more secure
Mysql-u root-p
Mysql> drop database test; [Delete the test DATABASE]
Mysql> delete from mysql. user WHERE user = "; [deleting anonymous accounts]
Mysql> flush privileges; [reload permissions]
4. Install mysql extension
Yum-y install mysql-connector-odbc mysql-devel libdbi-dbd-mysql
5. Set the default encoding and other initial parameters (my. cnf)
Vi/etc/my. cnf
[Mysqld]
Datadir =/var/lib/mysql
Socket =/var/lib/mysql. sock
User = mysql
Default-character-set = utf8 [add]
Default-storage-engine = INNODB [add]
Old_passwords = 1
[Client]
Default-character-set = utf8 [add]
[Mysqld_safe]
Log-error =/var/log/mysqld. log
Pid-file =/var/run/mysqld. pid