Enabling remote access to mysql on debian
-
I need to enable remote access for a specific user on a mysql server, running debian oldstable. Bear in mind I'm no SQL expert nor a real sysadmin. Logging in phpmyadmin and looking at the Privileges page, I notice two odd things: an "Any" user, with host %, no password, and global USAGE privilege. No idea what does that mean or imply. If I "edit" that user, I see it has a lot of privileges on a table called test and on a test\_%, whatever that means - please notice I have no such tables in my database, at least they do not appear in the phpmyadmin list. root both have a line for "localhost" host, and for "127.0.0.1" host. Point 2 is fine, just odd, seems a bit redundant and senseless to me. Point 1 is what worries me, what am I supposed to do about that?
-
Answer:
In response to your questions. The "Any" user and the "test" database are used by mysql during installation to check that the database was installed properly. You can safely remove both after the installation. I am unsure about the redundancy in the root user "localhost" and "127.0.0.1". Mysql probably just does that to be safe. To allow remote access, you will need to edit the file /etc/mysql/my.cnf to make mysql bind to external interfaces. By default, mysql will only accept connections from localhost for security reasons. Follow the instructions given http://www.linuxquestions.org/questions/linux-newbie-8/connecting-to-a-mysql-server-not-on-localhost-568746/. After that, create a new user and give it the user's ip or '%' for all ips and restart mysql. The remote user should now be able to connect to the mysql instance.
Lohoris at Server Fault Visit the source
Related Q & A:
- How To Build Business Directory Using Php Mysql?Best solution by Stack Overflow
- How to completely backup all mysql databases?Best solution by Server Fault
- Mysql: What to do if a disc full happens on master OR slave and there is no space left to binary logs?Best solution by Server Fault
- How to install php5-fpm on Debian?Best solution by Server Fault
- I can open my car with the remote control on the key but to shut it the remote dont work its vauxhall vectra.Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.