.#-If LIB is an absolute path, assume it is a malloc shared library## Put LIB in mysqld_ld_preload, which will be added to LD_PRELOAD when# Running mysqld. See ld. so for details.Set_malloc_lib (){Malloc_lib = "$1"If ["$ malloc_lib" = tcmalloc]; thenPkglibdir = 'get _ mysql_config -- variable = pkglibdir'Malloc_lib =# This list is kept intentionally simple. Simply set -- malloc-lib# To a full path if another location is desired.For libdir in/usr/lib "$ pkglibdir&
/etc/my. cnf
8. execute the mysql system database initialization script
Cd/usr/local/mysql
Bin/mysql_install_db -- user = mysql
9. set the mysql installation directory permission and set the owner to mysql.
Chown-R
Install various services in Linux (III)-MySQLMySQL master-slave backup bitsCN.com
!! Assume that all installation packages are in the/share Directory. the installation directory is/opt !!
$ Ll/share-Rw-r -- 1 root 129041873 Nov 29 mysql-5.1.54-linux-i686-glibc23.tar.gz
========================================================== ============================================================================ Install MyS
methods at the bottom of the article.
$ Sudo/usr/local/mysql/scripts/mysql_install_db -- user = mysql -- basedir =/usr/local/mysql/-- datadir =/data/mysql/# Initialize mysql
4) configure my. cnf
$ sudo vi /usr/local/
MySQL multi-instance configuration (2), mysql instance Configuration
For centralized O M of MySQL databases, you can deploy multiple MySQL instances on one MySQL database server. This function is implemented through mysqld_multi. Mysqld_multi is used to manage multiple mysq
The latest MySQL product actually exceeded the version carried by RedHatEnterpriseLinux. However, stability and open source code are very important.
The latest MySQL product actually exceeded the version carried by Red Hat Enterprise Linux. However, stability and open source code are very important.
MySQL configuration file
The latest
Background requirements:1) Compile and install a MySQL database of version 5.5.x and above on a newly purchased server, and store all configuration files and data in/opt/mysql, it facilitates fast migration, replication, and overall backup in the future;2) run two instances in the same MySQL instance, one bound to port 3306 and the other bound to port 3307. binlo
Applications (such as PHP) execute MySQL statements in batches for a long time. Execute an SQL statement, but the SQL statement is too large or the statement contains blob or longblob fields. For example, processing image data. MySQL server has gone away is easy to cause. In a similar situation today, MySQL is just a cold saying:
configuration file is my. cnf.
MySQL has provided several samples of my. cnf files, which can be found in the/usr/local/mysqld/share/mysql/directory. These files are named my-small.cnf, my-medium.cnf, my-large.cnf, and my-huge.cnf, which can be found in the title of the system type that describes the configuration
installation. suppose that the configura option is used during installation. chlorine?
./Configure -- prefix =/usr/local/mysql -- datadir =/usr/local/mysql/data1 -- sysconfdir =/etc
Note: -- prefix install MYSQL to/usr/local/mysql,
-- Datadir generates/usr/local/mysql/data
cmake compilation and installation. here we install mysql 5.5.23. here we record the installation steps and procedures of CMAKE for future reference.
If a missing toolkit is found during compilation and installation, use yum install to download and install it separately and then continue.
The following installation involves several issues that need to be explained in advance:
Mysql will be installed in
)
The default data file storage directory of MySQL is/var/lib/mysql. To move the directory to/home/data, perform the following steps:
1. create a data directory under the home directory
Cd/home
Mkdir data
2. stop the MySQL service process:
Mysqladmin-u root-p shutdown
3. move the entire/var/lib/mysql directory t
correct compilation, but this is only the first step of success. configuring many MySQL variables also plays a key role in the normal operation of the server. You can assign values to these variables in a configuration file to make sure they take effect every time you start MySQL. this configuration file is my. cnf.
MySQL
is installed, run the following command to start MySql in the/etc/init. d directory.[Root @ test1 init. d] #/etc/init. d/MySQL start2. Stop/Usr/bin/mysqladmin-u root-P Shutdown3. Automatic Start1) Check whether MySQL is in the Auto Start List[Root @ test1 local] # sbin/chkconfig -- list2) Add MySQL to the startup Serv
6) port the corresponding file to the ARM platform
A) copy/usr/local/mysql from the pc to the same directory on the development board. I used nfs debugging, so the following command is required:
Cp-r/usr/local/mysql/opt/EmbedSky/root_nfs/usr/local/mysql
B) package and back up the compiled mysql database of arm to the
I. Architecture II. install Mysqlserver in DB1 (192168010) configuration as an example, DB2 configuration is basically the same, as long as you modify the server_id21 in mycnf install mysql-serverdb1apt-getinsta
I. Architecture
II. install Mysql server
The following uses the configuration of DB1 (192.168.0.10) as an example. the configuration of DB2 is basically the same. you only need to modify server_id
temporary files
Chown-R mysql: mysql/data/mysql
5) compile and install MySQL using cmake
[Plain]
Tar zxvf mysql-5.6.13.tar.gz
Cd mysql-5.6.13
Cmake.-DCMAKE_INSTALL_PREFIX =/opt/mysql-p
versions of Linux should be similar.Database: Mysql 4.0.17 source program installation (I believe the latest 5.1. * is similar, try again in a few days)Plan: run four mysql services:Assume that the server name is db-app (IP Address: 192.168.0.100 ),Assume the server name: db-app2 (IP: 192.168.0.101 ),Mysql in db-app,
2. PreparationUse the
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.