mysql安装


# ./configure --prefix=/usr/local/mysql --with-low-memory
# make
# make install
# groupadd mysql
# useradd -g mysql -s /bin/false -M mysql
# cp support-files/my-medium.cnf  /etc/my.cnf
# cd /usr/local/mysql
# ./bin/mysql_install_db --user=mysql
############################################    mysql_install_db     ##############################################
Installing MySQL system tables...
080921  4:38:14 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
080921  4:38:14 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
OK
Filling help tables...
080921  4:38:14 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
080921  4:38:14 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
OK
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/local/mysql/bin/mysqladmin -u root password 'new-password'
/usr/local/mysql/bin/mysqladmin -u root -h localhost.localdomain password 'new-password'
Alternatively you can run:
/usr/local/mysql/bin/mysql_secure_installation
which will 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 /usr/local/mysql ; /usr/local/mysql/bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
cd mysql-test ; perl mysql-test-run.pl
Please report any problems with the /usr/local/mysql/bin/mysqlbug script!
The latest information about MySQL is available on the web at
[url]http://www.mysql.com[/url]
Support MySQL by buying support/licenses at [url]http://shop.mysql.com[/url]
############################################         end          ##############################################
# chown -R root .
# chown -R mysql var
# chown -R mysql var/.
# chgrp -R mysql .
############################################         var          ##############################################
数据库文件:权限mysql
错误日志: /usr/local/mysql/var/*.err
############################################         end          ##############################################
# /usr/local/mysql/bin/mysqld_safe &
# cp ../src/mysql-5.0.67/support-files/mysql.server /etc/rc.d/init.d/mysqld
# chmod 700 /etc/rc.d/init.d/mysqld
# chkconfig --add mysqld
# chkconfig --level 345 mysqld on
############################################         init.d         ##############################################
# chkconfig --add mysqld
# chkconfig --level 345 mysqld on                               这两条命令前  # /etc/init.d/中没有mysqld
############################################         end          ##############################################
配置库文件搜索路径
# echo "/usr/local/mysql/lib/mysql" >> /etc/ld.so.conf
# ldconfig -v
################################################################################################################
添加/usr/local/mysql/bin到环境变量PATH中
# export PATH=$PATH:/usr/local/mysql/bin                            mysqladmin、mysql等命令可以直接执行.重启后后失效
################################################################################################################
永久修改
vi ,bashrc
export PATH=$PATH:/usr/local/mysql/bin
立即生效
source .bashrc
################################################################################################################
# mysqladmin -u root password 123456
080921  4:38:14 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
080921  4:38:14 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
OK
Filling help tables...
080921  4:38:14 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
080921  4:38:14 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
OK
还是不知道
080921  4:38:14 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
080921  4:38:14 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
OK
Filling help tables...
080921  4:38:14 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
080921  4:38:14 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
OK
是哪里错了 ,就先这样吧

本文出自 “暗月影者” 博客,请务必保留此出处http://0451861.blog.51cto.com/133006/100929

你可能感兴趣的:(mysql,数据库,安装,职场,休闲)