文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>MySQL编译安装

MySQL编译安装

时间:2006-05-20  来源:banyao

    编译安装就是那么麻烦吗?? 唉,昨晚又没睡好拉,4点钟还是没有装好,老是一大堆出错信息
把安装步骤贴下,以后看这在修改:
tar ------> mysql-5.0.18
1.  ./configure --sysconfdir=/etc --prefix=/usr/local/mysql
//安装帮助文档是这样的./configure  --prefix=/usr/local/mysql --enable-assembler  --with-mysqld-ldflags=-all-static
2. make
出错信息:
../mysys/libmysys.a(mf_pack.o): In function `unpack_dirname':
mf_pack.c.text+0x4b7): warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
mf_pack.c.text+0x4c4): warning: Using 'endpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
sql_trigger.cc:38: warning: invalid access to non-static data member `Table_triggers_list::definitions_list' of NULL object
sql_trigger.cc:38: warning: (perhaps the `offsetof' macro was used incorrectly)
sql_trigger.cc:43: warning: invalid access to non-static data member `Table_triggers_list::definition_modes_list' of NULL object
sql_trigger.cc:43: warning: (perhaps the `offsetof' macro was used incorrectly)
sql_trigger.cc:48: warning: invalid access to non-static data member `Table_triggers_list::definers_list' of NULL object
sql_trigger.cc:48: warning: (perhaps the `offsetof' macro was used incorrectly)
sql_trigger.cc: In member function `virtual bool Handle_old_incorrect_sql_modes_hook::process_unknown_string(char*&, char*, MEM_ROOT*, char*)':
sql_trigger.cc:1247: warning: invalid access to non-static data member `Table_triggers_list::definition_modes_list' of NULL object
sql_trigger.cc:1247: warning: (perhaps the `offsetof' macro was used incorrectly)
sql_udf.o: In function `udf_init()':
sql_udf.cc.text+0x95f): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
mysqld.o: In function `init_server_components()':
mysqld.cc.text+0x1dec): warning: Using 'initgroups' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
mysqld.o: In function `main':
mysqld.cc.text+0x5711): warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
mysqld.cc.text+0x6015): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
../mysys/libmysys.a(mf_pack.o): In function `unpack_dirname':
mf_pack.c.text+0x4c4): warning: Using 'endpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
hostname.o: In function `ip_to_hostname(in_addr*, unsigned int*)':
hostname.cc.text+0x5f2): warning: Using 'gethostbyaddr' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
mysqld.o: In function `get_one_option(int, my_option const*, char*)':
mysqld.cc.text+0x3807): warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
../mysys/libmysys.a(my_gethostbyname.o): In function `my_gethostbyname_r':
my_gethostbyname.c.text+0x30): warning: Using 'gethostbyname_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
mysqld.o: In function `init_common_variables(char const*, int, char**, char const**)':
mysqld.cc:(.text+0x557c): warning: Using 'getservbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking

3. make install

4 #useradd -d /usr/local/mysql mysql

5 #cp /usr/local/mysql/share/mysql/my-small.cnf  /etc/my.cnf

启动不了:
启动信息:
[root@BanYao bin]# pwd
/usr/local/mysql/bin
[root@BanYao bin]# ./mysqld_safe
Starting mysqld daemon with databases from /usr/local/mysql/var
STOPPING server from pid file /usr/local/mysql/var/BanYao.pid
060520 04:26:40  mysqld ended

[root@BanYao bin]#

 1、ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'kk'
空账号可以登陆,但没有创建数据库的权限
 忘记MySQL的root密码,怎么修改
如果 MySQL 正在运行,首先杀之: killall -TERM mysqld。
启动 MySQL :PATH_TO_MYSQL/bin/mysqld --skip-grant-tables &
就可以不需要密码就进入 MySQL 了。
然后就是
mysql>use mysql
mysql>update user set password=password("new_pass") where user="root";
mysql>flush privileges;
重新杀 MySQL ,用正常方法启动 MySQL
一定注意:很多新手没有用password=password("..."),而是直接password="..."所以改掉密码不好

可TMD就是不给我登录,登录也是无权限修改
 


相关阅读 更多 +
排行榜 更多 +
找茬脑洞的世界安卓版

找茬脑洞的世界安卓版

休闲益智 下载
滑板英雄跑酷2手游

滑板英雄跑酷2手游

休闲益智 下载
披萨对对看下载

披萨对对看下载

休闲益智 下载