Now it's MySQL's turn...
来源:互联网 发布:lol换皮肤软件 编辑:程序博客网 时间:2024/05/21 21:43
Some problems encounted this afternoon, when trying to setup/test mysql capabilities on hypnos and virgil.
1.ERROR 2003 (HY000): Can't connect to MySQL server on 'server-name' (111)
access locally (i.e. from localhost) is fine, when trying remotely got this error. when tried with mysql++ library, got the following:
terminate called after throwing an instance of 'mysqlpp::ConnectionFailed'
what(): Can't connect to MySQL server on 'hypnos' (111)
After some searches, it appears this is just indicate network issue, not to do with mysql authentication.
TWO most likely reasons are:
a. with --skip-networking
on it will not accept TCP/IP connections at all.
b. with --bind-address=127.0.0.1
, it will listen for TCP/IP connections only locally on the loopback interface and will not accept remote connections.
did find skip-networking option from mysql-workbench and it's off, not find bind-address at all from intotal maybe hundreds options, but it turned out it IS bind-address THE ARCH CRIMINAL!!!
solution: comments out bind-address=127.0.0.1
from /etc/mysql/my.cnf
Some other tips came across during the search
2. UFW -- The default firewall configuration tool for Ubuntu.
https://help.ubuntu.com/community/UFW
http://blog.bodhizazen.net/linux/firewall-ubuntu-gufw/
http://blog.bodhizazen.net/linux/fir...untu-desktops/
http://blog.bodhizazen.net/linux/fir...buntu-servers/
example: To allow/deny incoming tcp and udp packet on port 53
sudo ufw allow/deny 53
example: To allow/deny incoming tcp packets on port 53
sudo ufw allow/deny 53/tcp
example: To allow/deny incoming udp packes on port 53
sudo ufw allow/deny 53/udp
3. Error communicating with gnome-keyring-daemon, when initially using mysql-workbench to connect to mysql database
a good collection of threads:
http://ubuntuforums.org/showthread.php?p=9359283
1) gnome-keyring-daemon is a piece of software that works like a "safe password database" for other applications to use
2) other applications access it through libgnome-keyring
3) recent changes on libgnome-keyring made it unable to find gnome-keyring-daemon through "environment variables", but only through "dbus"
4) in order to dbus be able to find gnome-keyring-daemon it must be started BEFORE
5) on system start up, dbus is started AFTER gnome-keyring-daemon
6) so: no application which uses libgnome-keyring can access gnome-keyring-daemon because dbus can't see it
Solution: manually start:
$shell> gnome-keyring-daemon
4. Emptying mysql tables - DELETE or TRUNCATE?
http://netfactory.dk/2005/11/21/emptying-mysql-tables/
DELETE FROM tablename;
TRUNCATE tablename;
"Besides the fact that it seems to be faster (even on small tables with few rows) – which in itself is a reason to favour this method – it also has another nice feature, which may be desirable. It resets the AUTO_INCREMENT field if it exists, and let the counter start over from 1.
Deleting rows in the table with the first statement will let the AUTO_INCREMENT counter continiue from where it was before the rows were deleted."
5. OnlineMySQL Training Course
http://www.webdevelopersnotes.com/tutorials/sql/online_mysql_training_course_counting.php3
- Now it's MySQL's turn...
- it 's time to turn to java
- NOW ! It's time to implement "FFT" !
- MySQL test: it’s because of RQG that we now have a really solid MySQL Server
- Bill_Lang's Study & Life [时间管理经典]Do It Now
- It`s time now 做回我自己
- Sudoku Solver, Now it's possible to solve expert level question in less than 2 minutes
- It's worth it!
- Let's turn on the air-conditioner
- Nothing 's gonna stop us now !
- Patrick’s blog is online now!
- That's all for now folks
- Warning: The VM will try to fix the stack guard now.It's highly recommended that you fix the library
- It's my life.
- It's only me
- It's my life
- It's test!
- it's amazing
- 探寻C++最快的读取文件的方案
- 关于默认网关不可用的问题
- svn,cvs,vss杂烩
- 再谈Java的Thread机制 - 3
- 2010-05-28
- Now it's MySQL's turn...
- 来控制自己的力量和旋转
- Flex+BlazeDS整合J2EE实例
- Desktop Search? No, Thanks!
- .NET发送邮件
- 刚刚收到的邮件,Google对Admob的收购已经顺利结束
- Tapestry5 grid
- 给DropDownList赋值
- 给DropDownList赋值