Precautions for installing and using MySQL on the server (1)

Source: Internet
Author: User
Precautions for installing and using MySQL on the server 1. How to obtain the latest MySQL version? To install MySQL, you must first obtain the latest version of MySQL. Although we all know that MySQL can be found in FreeBSD Packages, I suggest you go to the network to find the latest version of MySQL. I will introduce you to http:

Precautions for installing and using MySQL on the server 1. How to obtain the latest MySQL version? To install MySQL, you must first obtain the latest version of MySQL. Although we all know that MySQL can be found in FreeBSD Packages, I suggest you go to the network to find the latest version of MySQL. I will introduce you to http:

Install and use on the serverMySQLNotes
1. How to obtain the latest versionMySQL?
To installMySQL,First of all, you must obtain the latest version.FreeBSDOfPackagesYou can findMySQLBut I suggest you go to the network to find the latest version.MySQL. I will introduce youHttp://www.mysql.orgDownload the latest version.MySQL 3.23 versions.
Ii. InstallationMySQLWhat are the precautions?
1If you useMySQL + ApacheIs used againFreeBSDFor network operating systems, you should pay attentionFreeBSDInFreeBSDOf3.0For the following versions,MySQL SourceIncludedMIT-pthreadRunning is normal, but you must useNative threads,That is, addWith-named-thread-libs =-lc_r.
2If youCOMPILEAn error occurred. Check yourGccWhether the version is in2.81Version or above,GmakeWhether the version is in3.75Above.
3If it is not a version issue, it may be that your memory is insufficient. Please use./Configure -- with-low-memoryTo join.
4If you want to redo yourConfigure, You can typeRm config. cacheAndMake cleanTo clear records.
5GenerallyMySQLInstall/Usr/localDirectory. This is the default value. You can also set the directory you want to install.

Iii. Start and StopMySQL
If you have never installedMySQLTo installMySQLThe last command is/Usr/local/mysql-3.23X/scripts/mysql_install_db
If you install multiple machines at the same time, you can edit the file so that you can easily set permissions for each machine.
1, In the installation directory/Usr/localStartMysqlAvailable/Usr/local/share/mysql. server startRememberMysql. serverTo777
2, To stopMysql daemonAvailable/Usr/local/bin/mysqladmin shutdownTo achieve
3If yourMysqlThe password has been set. You must useMysqladmin-u root-p shutdownTo achieve
Iv. UseRootCreate oneMYSQLUser
You must first useRootLog on to the machine and change the directory access permission.Chown-R mysql/usr/local/varAnd then modifyMysql. serverFile, which is located in/Usr/local/share/mysql/NextMysql_daemon_user = rootChangeMysql_daemon_user = mysql.
However, after adding a database, remember to change your file access permission:Chown-R mysql/usr/local/var/some_new_dbs
If you want your computer to automatically loadMysql, You just need/Etc/rc. localAdd a row/Usr/local/mysql/share. server start

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.