Installation configuration options for mysql5.5

Source: Internet
Author: User
Tags deprecated

Installation dependency: Libncurses-dev Ncurses-devel


Create User: Groupadd MySQL; Useradd mysql-s/sbin/nologin-m-G MySQL


Compile and install:

TAR-ZXF mysql-5.5.xxx.tar.gz

CD mysql-5.5.xxx


CMake. -DCMAKE_INSTALL_PREFIX=/USR/LOCAL/MYSQL-5.5.XX \

-dmysql_datadir=/usr/local/mysql-5.5.xx/data \

-dmysql_unix_addr=/usr/local/mysql-5.5.xx/tmp/mysql.sock \

-ddefault_charset=utf8 \

-DDEFAULT_COLLATION=UTF8_GENERAL_CI \

-DEXTRA_CHARSETS=GBK,GB2312,UTF8,ASCII \

-denabled_local_infile=on \

-dwith_innobase_storage_engine=1 \

-dwith_federater_storage_engine=1 \

-dwith_blackhole_storage_engine=1 \

-dwith_example_storage_engine=1 \

-dwith_partition_storage_engine=1 \

-dwith_fast_mutexes=1 \

-dwith_zlib=bundled \

-denabled_local_infile=1 \

-dwith_readline=1

-dwith_embedded_server=1 \

-dwith_debug=0


Make-j 8 && make install


Ln-s/application/mysql-5.5.xx//application/mysql


Cp/path/to/mysql-5.5.xx/support-files/my-large.cnf/etc/my.cnf


Echo ' Export path=/application/mysql/bin: $PATH ' >>/etc/profile

Tail-l/etc/profile

Source/etc/profile

Echo $PATH


Mkdir-p/application/mysql/data

Chown-r Mysql:mysql/application/mysql

Chmod-r 1777/tmp


/application/mysql/scripts/mysql_install_db--basedir=/application/mysql--datadir=/application/mysql/data/-- User=mysql


<code>

Installing MySQL system tables ...

151013 16:14:18 [Warning] Using unique option prefix Key_buffer instead of key_buffer_size is deprecated and would be Remov Ed in a future release. Please use the full name instead.

Ok

Filling Help Tables ...

151013 16:14:20 [Warning] Using unique option prefix Key_buffer instead of key_buffer_size is deprecated and would be Remov Ed in a future release. Please use the full name instead.

Ok


To start mysqld at boot time with to copy

Support-files/mysql.server to the right place for your system


REMEMBER to SET A PASSWORD for the MySQL root USER!

To does so, start the server, then issue the following commands:


/application/mysql/bin/mysqladmin-u root password ' new-password '

/application/mysql/bin/mysqladmin-u root-h fangsempire-qa password ' new-password '


Alternatively you can run:

/application/mysql/bin/mysql_secure_installation


Which would also give you the option of removing the test

Databases and anonymous user created by default. This is

Strongly recommended for production servers.


See the Manual for more instructions.


You can start the MySQL daemon with:

Cd/application/mysql; /application/mysql/bin/mysqld_safe &


You can test the MySQL daemon with mysql-test-run.pl

Cd/application/mysql/mysql-test; Perl mysql-test-run.pl

Problems at http://bugs.mysql.com/

</code>


Access denied for user ' root ' @ ' localhost ' (using password:no) Problem Resolution:

Pkill mysqld

lsof-i:3306

rm-rf/application/mysql/data/*

/application/mysql/scripts/mysql_install_db--basedir=/application/mysql--datadir=/application/mysql/data/-- User=mysql


drop database test;

Select User,host from Mysql.user;

Delete from mysql.user where user= ';

Delete from Mysql.user where host= ' hostname ';


Delete from Mysql.user;

Grant all privileges on * * to ' system ' @ ' localhost ' identified by ' password ' with GRANT option;

Flush privileges;

Select User,host from Mysql.user;


/application/mysql/bin/mysqladmin-u root password ' password '




Installation configuration options for mysql5.5

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.