Koozali.org: home of the SME Server

get in contact with the MySql db... ??

Sonny

get in contact with the MySql db... ??
« on: October 05, 2002, 01:32:38 AM »
Hi there!

I hawe just uploaded phpmyadmin to an i-bay on the server, and now wantes to get in the DB to create som tables etc....

I have made the nessecerry changes to the config.php3 file...
But i cant seam to get in....

Do i have to make somthing AT the server, before the DB workes... ??
I have tried with the username "root" and "admin" and then the password i use to get in the server-manager part.... but still no luck....

Whats wrong :-( ??

Sonny

Dan Brown

Re: get in contact with the MySql db... ??
« Reply #1 on: October 05, 2002, 01:36:06 AM »
Try searching here to find one of the other 975 times this has been discussed, maybe?

Nathan Fowler

Re: get in contact with the MySql db... ??
« Reply #2 on: October 06, 2002, 07:43:07 AM »
[Rant]
Good call Dan, I find that I to am very frustrated with covering the same topics over and over.  I find these people don't have BINS (Basic Internet Navigation Skills).  I also find it very distrubing that similar people are so quick to post a question without trying ANYTHING and doing ZERO research.  I love the "Has anyone tried to install X on Y?  Perhaps they could write a how-to".  Perhaps they could try reading the installation documentation, or at least TRYING to install it before seeking help.  E-smith must be doing well, it's more than obvious that these are Microsoft users with a Microsoft mentality embracing a proven technology only to be wide-eyed at the fact no one is there to hold their hands along the way.
[End Rant]

Sonny

Re: get in contact with the MySql db... ??
« Reply #3 on: October 06, 2002, 06:20:21 PM »
Oaky

I have now searched the forums, and found some help.......

I have get in contact with the mysql server throu winmysqladmin from inside the local network, and only by using the username root with no password..... :-(

I have createt a new user (throu winmysqladmin) but i can't get this user to connect to the mysql-server......

Then i found a post in here (http://www.e-smith.org/bboard/read.php?f1&i=18580&t=18558&v=f

The last post sayes somthing about changing somthing in a file (/etc/e-smith/templates/etc/rc.d/init.d/masq/45DenyMySQL

And i have tryet this also... but still i cant conect to the mysql-server with other user's other than the root.....

Anny point's i might have missed ??

Quade

Re: get in contact with the MySql db... ??
« Reply #4 on: October 07, 2002, 07:05:20 PM »
Hey Sonny,
Don't let the vitriol get you down. Some people just don't like helping newbies... Despite the fact at one time they didn't know anything either.

I'm not sure if I understand your problem to the fullest, but I'll *try* to help you out.

You may have to create a new user in the mysql database itself. There are e-smith specific examples of how to do this, but for the sake of a robust answer, try this:

Assuming you're logged in the e-smith console as root, start mysql by typing "myql"

If you're not, start mysql by typing "mysql -u -p" and you'll be prompted for a password.

do the following at the mysql prompt:
mysql> use mysql;

mysql> insert into user (Host, User, Password, Select_priv, Insert_priv, Delete_priv, Update_priv, Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv, File_priv, Grant_priv, References_priv, Index_priv, Alter_priv) values('localhost', '', PASSWORD('
mysql> flush privileges;

mysql> exit;

What you would have just done is created a new mysql user that has full access to everything. In the PHP scripts, the connection code should be something like:
    $link = mysql_connect ('localhost', '', '');

Any PHP script (including your phpmyadmin installation) that contains that connection to the mysql database should have any mysql commands at its disposal.

Personally, I'd forget phpmyadmin unless you are doing a LOT of entries into a database, or will have someone else make your entries. In either case, there are better ways to do these jobs. You could create all of your MySQL entries in a text file, and execute them from the command line (usually something like: mysql < path/to/file.sql)

Further recommended reading:
The MySQL Pocket Reference: http://developer.sapien.net/mysql_pkt_ref/ -- This has all the essential MySQL commands with samples.

HTH
-Quade

Sonny

Re: get in contact with the MySql db... ??
« Reply #5 on: October 08, 2002, 12:43:05 PM »
i got it to work... thanx :-)

MiND BLiNG

STFU Nathan!
« Reply #6 on: October 18, 2002, 12:38:41 PM »
STFU Nathan! If I here one more rant about the company that pays my car note every month even though I do love linux. I will freakin' Scream!