unable to access database from admin panel.

Hey guys,

Me and my buddy are running a site and using mysql to store user info and other relevant data. Thing is we can't see any users when we log into the site's admin panel, but the users and everything else is being saved properly into mysql db and shows up fine in phpmyadmin.

Now I am pretty new to SQL in general. If assuming the code for the admin panel is correct (its a custom written admin panel) and it is making valid queries to sql. What sort of user privileges should be set to show those tables/columns in the admin panel.

Does it need the same name as the login id, admin@example.com, and does the host remain "localhost". Finally do i need to comment out skip-networking in /etc/mysql/my.cnf?

Any help appreciated. :)

5 Replies

Hey BipBop,

I'd take a look through the code for a config file – it'll give you the MySQL username (and usually) the password as well. This set of credentials is completely separate from other things. You can use SHOW GRANTS FOR once you're in.

Take a look at the MySQL tunneling guide so you can edit your stuff locally:

http://library.linode.com/databases/mys … ssh-tunnel">http://library.linode.com/databases/mysql/mysql-ssh-tunnel

Good luck :D

Hi

I have checked the conifg.inc.php file and the database details are fine in there and the connection to the database is working also. :)

any other ideas? :)

If my question isn't clear or vague please ask me for clarification. I tried to explain clearly about what I am trying to accomplish.

If "skip-networking" is in effect, then MySQL is not listening on any network interfaces (local or otherwise). You can check this with the command (as root):

netstat -lvpnut | grep 3306

If there is no output, then any application trying to connect to MySQL over the network interface will fail. Your choices are to point the application to the appropriate UNIX socket file (probably something like /var/lib/mysql/mysql.sock) or enable networking in MySQL.

Edit: missed you saying that the client was connecting OK. In that case, try logging the activity and see what queries are coming in to MySQL.

Ok I got it working, looks like some tweaking was needed around the admin code. :) Thanks for the help guys.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct