Showing posts with label MySQL. Show all posts
Showing posts with label MySQL. Show all posts
Friday, 15 August 2014
How to Allow MySQL Client to Connect to Remote MySQL server
Issue: How do I allow a MySQL client to connect to a MySQL database server?
Solution: By default, MySQL does not allow remote clients to connect to the MySQL database.
If you try to connect to a remote MySQL database from your client system, you will get the “Host is not allowed to connect to this MySQL server” message as shown below.
$ mysql -h 192.168.1.8 -u root -p
Enter password:
ERROR 1130: Host '192.168.1.4' is not allowed to connect to this MySQL server
You can also validate this by doing telnet to 3306 mysql port as shown below, which will also give the same “host is not allowed to connect to this MySQL server” error message.
$ telnet 192.168.1.8 3306
host 192.168.1.4 is not allowed to connect to this mysql server
If you want to allow a specific client ip-address (for example: 192.168.1.4) to access the MySQL database running on a server, you should execute the following command on the server that is running the MySQL database.
$ mysql -u root -p
Enter password:
mysql> use mysql
mysql> GRANT ALL ON *.* to root@'192.168.1.4' IDENTIFIED BY 'your-root-password';
mysql> FLUSH PRIVILEGES;
Also, update firewall rules to make sure port# 3306 is open on the server that is running the MySQL database.
After the above changes, when you try to connect to the MySQL database from a remote client, you’ll not get the “Host is not allowed to connect to this MySQL server” error message any more.
How Edit MySQL connection Error
Cannot connect to MySQL server over network
Check /etc/my.cnf and make sure you are listening for outside connections. edit the line that starts with bind-address**************************************************************************
change:
to:Code:bind-address = 127.0.0.1
make sure mysql is running:Code:#bind-address = 127.0.0.1
if not, start it:Code:/etc/init.d/mysql status
check if the ubuntu firewall is runningCode:/etc/init.d/mysql start
if it is, allow mysqlCode:sudo ufw status
Code:sudo ufw allow mysql
Possibly a security precaution. You could try adding a new administrator account:
Although as Pascal and others have noted it's not a great idea to
have a user with this kind of access open to any IP. If you need an
administrative user, use root, and leave it on localhost. For any other
action specify exactly the privileges you need and limit the
accessibility of the user as Pascal has suggest below.From the MySQL FAQ: If you cannot figure out why you get Access denied, remove from the user table all entries that have Host values containing wildcards (entries that contain '%' or '_' characters). A very common error is to insert a new entry with Host='%' and User='some_user', thinking that this allows you to specify localhost to connect from the same machine. The reason that this does not work is that the default privileges include an entry with Host='localhost' and User=''. Because that entry has a Host value 'localhost' that is more specific than '%', it is used in preference to the new entry when connecting from localhost! The correct procedure is to insert a second entry with Host='localhost' and User='some_user', or to delete the entry with Host='localhost' and User=''. After deleting the entry, remember to issue a FLUSH PRIVILEGES statement to reload the grant tables. See also Section 5.4.4, “Access Control, Stage 1: Connection Verification”. |
Thursday, 19 July 2012
How to solve the Lampp Linux install Error on a 64bit Architecture
Xampp to Linux error –
XAMPP is currently only availably as 32 bit application. Please use a 32 bit compatibility library for your system.
ERROR If your are running XAMPP in a Ubuntu 64 bits, and found the following error: XAMPP is currently only availably as 32 bit application. Please use a 32 bit compatibility library for your system.
You must go to Sypnatic package manager, in the search field, insert: ia32-libs and install that package.
here is Lampp running correctly but it presents another error, which you'll find the solution in another poster of mine here
Source: Ubuntu Help
This is another posting showing "how to do computing" for everyday computer usages... For a general public
XAMPP is currently only availably as 32 bit application. Please use a 32 bit compatibility library for your system.
ERROR If your are running XAMPP in a Ubuntu 64 bits, and found the following error: XAMPP is currently only availably as 32 bit application. Please use a 32 bit compatibility library for your system.
You must go to Sypnatic package manager, in the search field, insert: ia32-libs and install that package.
here is Lampp running correctly but it presents another error, which you'll find the solution in another poster of mine here
Source: Ubuntu Help
This is another posting showing "how to do computing" for everyday computer usages... For a general public
Labels:
Command Line,
File systems,
HTML,
Kernel,
Kubuntu,
lampp,
linux,
MySQL,
OS,
PHP,
phpMyAdmin,
Server,
SQL,
sqldeveloper,
systems,
Terminal,
Troubleshoot,
tutorial,
ubuntu
Location:
Cambs, Germany
Subscribe to:
Posts (Atom)
How to check for open ports on Linux
Checking for open ports is among the first steps to secure your device. Listening services may be the entrance for attackers who may exploit...
-
How To Hide and unhide the hard disk Volumes using CMD Commands : First check how many drives are there in my computer and then s...
-
Simplify Your Ansible Playbook Creation with ChatGPT Are you tired of writing complex Ansible playbooks manually? Want to streamline your ...
-
New GNS3 Setup With Lower CPU Load and Lower Memory Consumption ..Try It !!!