日期:2014-05-16  浏览次数:20865 次

Ubuntu 9.10下安装配置mysql 6.0.10

?

安装到usr/local/mysql中


解压文件


释放后将名称改为mysql


复制此文件夹到usr/local下


sudo chmod -R 777 mysql


sudo cp /usr/local/mysql/surport-file/my-small.cnf???? /etc/my.cnf

注意下面的操作 命令执行的位置很重要,不然会说找不到


cd /usr/local/mysql


此时因为还没有初始化数据库, 直接 ./bin/mysqld 是成功不了的,你可以试试

pwd 显示
/usr/local/mysql??????????????? (注意此时必须在这个目录下)
然后


scripts/mysql_install_db


出现:

?

eric-desktop mysql # scripts/mysql_install_db
chown: invalid user: `mysql'
chown: invalid user: `mysql'
chown: invalid user: `mysql'



Installing MySQL system tables...
100721 15:17:56 [ERROR] Fatal error: Can't change to run as user 'mysql' ;? Please check that the user exists!

100721 15:17:56 [ERROR] Aborting

100721 15:17:56 - mysqld got signal 11 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help diagnose
the problem, but since we have already crashed, something is definitely wrong
and this may fail.

key_buffer_size=0
read_buffer_size=262144
max_used_connections=0
max_threads=151
thread_count=0
connection_count=0
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 49325 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd: 0x0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = (nil) thread_stack 0x30000
/usr/local/mysql/bin/mysqld(my_print_stacktrace+0x2d) [0x86f53fd]
/usr/local/mysql/bin/mysqld(handle_segfault+0x39f) [0x8265ddf]
[0xcd8400]
/usr/local/mysql/bin/mysqld [0x8264f74]
/usr/local/mysql/bin/mysqld(unireg_abort+0x30) [0x8267690]
/usr/local/mysql/bin/mysqld(main+0xac6) [0x826bad6]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6) [0x674b56]
/usr/local/mysql/bin/mysqld(__fxstat64+0xad) [0x819b5a1]
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.

Installation of system tables failed!? Examine the logs in
/home/oem/Data for more information.

You can try to start the mysqld daemon with:

??? shell> /usr/local/mysql/bin/mysqld --skip-grant &

and use the command line tool /usr/local/mysql/bin/mysql
to connect to the mysql database and look at the grant tables:

??? shell> /usr/local/mysql/bin/mysql -u root mysql
??? mysql> show tables

Try 'mysqld --help' if you have problems with paths.? Using --log
gives you a log in /home/oem/Data that may be helpful.

The latest information about MySQL is available on the web at
http://www.mysql.com/.? Please consult the MySQL manual section
'Problems running mysql_install_db', and the manual section that
describes problems on your OS.? Another information source are the
MySQL email archives available at http://lists.mysql.com/.

Please check all of the above before mailing us!? And remember, if
you do mail us, you MUST use the /usr/local/mysql/scripts/mysqlbug script!

?

?

?

说用户“mysql”不合法,于是,打开/etc/mysql/my.cnf 修改如下:

?

user??? ??? = root
pid-file??? = /var/run/mysqld/mysqld.pid
socket??? ??? = /var/run/mysqld/mysqld.sock
port??? ??? = 3306