Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > Database Server Software > MySQL > MySQL Account Creation/Remote access Q

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-01-03, 14:02
RhythmAddict RhythmAddict is offline
Registered User
 
Join Date: Dec 2003
Posts: 148
MySQL Account Creation/Remote access Q

Hey eveyone - kind of new to MySQL, so please excuse my ignorance.
Alright, so I created a DB on a RH8 box. Works fine, the Web App is local to the machine and that works fine too.

The DB name is branches - right now it is just on a test box and I use the root user to access it (as does the CFM webapp). I need to create a user account that will have basically full permissions (insert/update/etc) to the branches DB. Lets just call this accout webuser for now - FYI im gonna use this account to connect to the *nix mysql DB from my Win machine. I've tried creating an account numerous times on the *nix mysql DB...the actual account creation seems to work fine, but in MySQLyog I just get "Lost connetion to MySQL server during query" BTW, this happens even if I try to connect using the root MySQL account...same exact error.

Furthermore, something is fundamentally wrong with the way I'm creating accounts because if I make the webapp access the MySQL Branches db using the 'webuser' account, it does not work.

The syntax I am using to create the user under MySQL is:

mysql> set password for 'webuser'@'localhost' = password('mypassword');
Query OK, 0 rows affected (0.00 sec)

mysql> set password for 'webuser'@'%' = password('mypassword');

Query OK, 0 rows affected (0.00 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)

Any help would be greatly appreciated, thank you in advance.
Reply With Quote
  #2 (permalink)  
Old 12-15-03, 05:31
hitesh2512 hitesh2512 is offline
Registered User
 
Join Date: Jun 2003
Posts: 9
GRANT ALL ON <DBNAME>.* TO <USER>@'%' IDENTIFIED BY '<PASSWD>'

do this on mysql prompt
replace % if u think u need to restrict access from particular IPs only

For MySQL gone away, change the timeout values (interactive timeout shld do it) which you have in the MySQL settings

(do SHOW VARIABLES LIKE '%timeout%' to get an idea)

change settings in my.cnf to make changes permanent
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On