Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Wed Sep 21, 2011 2:24 am 
Offline
Senior Newbie

Joined: Thu Apr 28, 2011 6:38 pm
Posts: 18
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. :)


Top
   
 Post subject:
PostPosted: Wed Sep 21, 2011 8:15 am 
Offline
Linode Staff
User avatar

Joined: Fri Jan 29, 2010 8:44 am
Posts: 65
Location: New Jersey
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

Good luck :D


Top
   
 Post subject:
PostPosted: Wed Sep 21, 2011 2:48 pm 
Offline
Senior Newbie

Joined: Thu Apr 28, 2011 6:38 pm
Posts: 18
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. :)


Top
   
 Post subject:
PostPosted: Thu Sep 22, 2011 4:13 pm 
Offline
Senior Newbie

Joined: Thu Apr 28, 2011 6:38 pm
Posts: 18
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.


Top
   
 Post subject:
PostPosted: Fri Sep 23, 2011 12:28 am 
Offline
Senior Member
User avatar

Joined: Sun Jan 18, 2009 2:41 pm
Posts: 830
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):
Code:
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.


Top
   
 Post subject:
PostPosted: Thu Sep 29, 2011 4:11 pm 
Offline
Senior Newbie

Joined: Thu Apr 28, 2011 6:38 pm
Posts: 18
Ok I got it working, looks like some tweaking was needed around the admin code. :) Thanks for the help guys.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group