mysql数据库安装及配置、异常解决

mysql数据库安装及配置、异常解决

ID:8972567

大小:184.50 KB

页数:7页

时间:2018-04-13

上传者:U-5734
mysql数据库安装及配置、异常解决_第1页
mysql数据库安装及配置、异常解决_第2页
mysql数据库安装及配置、异常解决_第3页
mysql数据库安装及配置、异常解决_第4页
mysql数据库安装及配置、异常解决_第5页
资源描述:

《mysql数据库安装及配置、异常解决》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库

目录一、MySQL数据库删除2二、MySQL数据库安装2三、远程连接MYSQL提示HostisnotallowedtoconnecttothisMySQLserver2四、Accessdeniedforuser''@'localhost'todatabase'mysql'4五、linux的mysql的大小写配置5六、创建或导入函数时,MySQL创建Function时报的1418错误代号解决办法5七、查询数据库的字符集合6八、mysqlnoinstall安装6九、linuxcentos5.3mysql数据库同步定时备份及恢复6十、MySQL数据库导入导出详解[转发]7 一、MySQL数据库删除1.rpm-qamysql2.yumremovemysql删之前先备份:1.[root@tt1~]#cd/var/lib/mysql;cp-r*/backup/mysql//备份数据库2.[root@tt1~]#mysqldump-uroot-pyourdatabase|gzip-9>yourdatabase.date.gz3.[root@tt1~]#rm/etc/my.cnf4.[root@tt1~]#rm-r/var/lib/mysql参考网址:http://hi.chinaunix.net/?uid-21943618-action-viewspace-itemid-41185二、MySQL数据库安装1.用到的包:MySQL-server-5.5.15-1.linux2.6.i386.rpmMySQL-client-5.5.15-1.linux2.6.i386.rpm2.[root@tt1~]#rpm-ivhMySQL-*3.[root@tt1~]#cd/usr/share/mysql;[root@tt1~]#cpmy-huge.cnf/etc/my.cnf;4./etc/rc.d/init.d/mysqlrestart参考网址:http://hi.chinaunix.net/?uid-21943618-action-viewspace-itemid-41185三、远程连接MYSQL提示HostisnotallowedtoconnecttothisMySQLserver 参考网址:http://apps.hi.baidu.com/share/detail/31572332如果你想连接你的mysql的时候发生这个错误:ERROR1130:Host'192.168.1.3'isnotallowedtoconnecttothisMySQLserver1。改表法。可能是你的帐号不允许从远程登陆,只能在localhost。这个时候只要在localhost的那台电脑,登入mysql后,更改"mysql"数据库里的"user"表里的"host"项,从"localhost"改称"%"mysql-uroot-pvmwaremysql>usemysql;mysql>updateusersethost='%'whereuser='root';mysql>selecthost,userfromuser;2.授权法。例如,你想myuser使用mypassword从任何主机连接到mysql服务器的话。GRANTALLPRIVILEGESON*.*TO'myuser'@'%'IDENTIFIEDBY'mypassword'WITHGRANTOPTION;如果你想允许用户myuser从ip为192.168.1.3的主机连接到mysql服务器,并使用mypassword作为密码GRANTALLPRIVILEGESON*.*TO'root'@'192.168.1.3'IDENTIFIEDBY'mypassword'WITHGRANTOPTION; GRANTALLPRIVILEGESON*.*TO'root'@'192.168.1.3'IDENTIFIEDBY'1235'WITHGRANTOPTION;mysql>flushprivileges;这句一定要加上!!!一、Accessdeniedforuser''@'localhost'todatabase'mysql'参考网址:http://chenling1018.blog.163.com/blog/static/148025420103710128776/最近新装好的mysql在进入mysql工具时,总是有错误提示:#mysql–uroot-pEnterpassword:ERROR1045(28000):Accessdeniedforuser'root'@'localhost'(usingpassword:NO)使用网上介绍的方法修改root用户的密码:#mysqladmin-uroot-ppassword'newpassword'Enterpassword:mysqladmin:connecttoserverat'localhost'failederror:'Accessdeniedforuser'root'@'localhost'(usingpassword:YES)'解决方法,如下(请先测试方法三):方法一:#/etc/init.d/mysqlstop#mysqld_safe--user=mysql--skip-grant-tables--skip-networking&#mysql-urootmysqlmysql>UPDATEuserSETPassword=PASSWORD('newpassword')whereUSER='root';mysql>FLUSHPRIVILEGES;mysql>quit#/etc/init.d/mysqlrestart#mysql-uroot-pEnterpassword:<输入新设的密码newpassword>mysql>方法二:直接使用/etc/mysql/debian.cnf文件中[client]节提供的用户名和密码:#mysql-udebian-sys-maint-pEnterpassword:<输入[client]节的密码>mysql>UPDATEuserSETPassword=PASSWORD('newpassword')whereUSER='root';mysql>FLUSHPRIVILEGES; mysql>quit#mysql-uroot-pEnterpassword:<输入新设的密码newpassword>mysql>方法三:#mysql-uroot-pEnterpassword:<输入/etc/mysql/debian.cnf文件中[client]节提供的密码>至此,困惑多时的问题解决了!一、linux的mysql的大小写配置参考网址:http://wdhdmx.iteye.com/blog/1171325忽略大小写的配置:在配置文件的/etc/mysql下的my.cnf中 [mysqld]区段下增加一行lower_case_table_names=1。二、创建或导入函数时,MySQL创建Function时报的1418错误代号解决办法参考网址:http://wdhdmx.iteye.com/blog/1171325以下是引用片段:ErrorCode:1418ThisfunctionhasnoneofDETERMINISTIC,NOSQL,orREADSSQLDATAinitsdeclarationandbinaryloggingisenabled(you*might*wanttousethelesssafelog_bin_trust_function_creatorsvariable)(0mstaken)  解决方法如下:  1.mysql>SETGLOBALlog_bin_trust_function_creators=1;  2.系统启动时--log-bin-trust-function-creators=13.在my.ini(linux下为my.conf)文件中[mysqld]标记后加一行内容为log-bin-trust-function-creators=1 -------------------------------------------------------------------------------------------如果在createfunction的时候有1418的错语的时候:那么只需要执行setgloballog_bin_trust_routine_creators=1;然后怎么createfunction都不会有问题(当然,你的function必段正确哦),这是mysql的一个bug,搞不懂为什么,反正这样做就OK了.另外,也可以直接在配置文件my.cnf中添加如下行[mysqld]log_bin_trust_routine_creators=1;这个命令可以在sqleditor的环境中运行,并不需要重新启动服务哦。一、查询数据库的字符集合--1、数据库编码selectdistincttable_schema,table_collationfrominformation_schema.TABLESwheretable_schemanotin('performance_schema','sys','test','mysql','information_schema');--2、表编码selectdistincttable_schema,table_collation,table_namefrominformation_schema.TABLESwheretable_schemanotin('performance_schema','sys','test','mysql','information_schema');--3、修改表的字符集altertablecam.accountcharsetutf8;--4、建库delimiter$$CREATEDATABASE`csf_fdp`/*!40100DEFAULTCHARACTERSETutf8*/$$二、mysqlnoinstall安装参考网址:http://blog.163.com/lufei_19840816/blog/static/616172732010223112615548/?fromdm&fromSearch&isFromSearchEngine=yes三、linuxcentos5.3mysql数据库同步定时备份及恢复参考网址: http://hi.baidu.com/%D7%F3%C6%B2%D7%D3%B5%CE%C5%BC/blog/item/0caf31113dc08801b9127b08.html一、MySQL数据库导入导出详解[转发]参考网址:http://www.cnblogs.com/xbf321/archive/2011/09/16/2178959.html

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。
关闭