Lunarpages Web Hosting Forum

Author Topic: How To connect to MySQL with client side programs  (Read 15136 times)

Offline RATTLESNAKE

  • Galactic Royalty
  • *****
  • Posts: 378
    • http://www.thesnakepits.com
How To connect to MySQL with client side programs
« on: March 31, 2004, 08:21:25 PM »
Most all connections with programs such as MySQL Control Center, MySQL Front etc.

here is a step by step connection for MySQL Control Center, use the same settings with other programs and you will be able to connect:

you will need to access your cpanel and go to the mysql section enter
the following in remote access

if your on a static ip (your ip does not change ever) enter in your ip

if you on a dynamic ip (your ip changes after every reboot, connection to
internet) enter in %

if your not sure of either enter %

for mysql control center enter the following in the general tab:

name = your name

host - http://www.domain.com

username - mysql username i.e. cpanelusername_mysqlusername

password - password for the mysql username

database tab:

enter in your database - cpanelusername_databasename

I hope this information is helpful

Offline lig

  • Spaceship Navigator
  • *****
  • Posts: 82
How To connect to MySQL with client side programs
« Reply #1 on: May 11, 2004, 09:25:18 PM »
Did it EXACTLY as you said and I still can't connect.
Life is a game... So have fun.

www.PHPCommunity.org: Open Source, Open Community
Visit for more information or to join the movement

Danielle

  • Guest
How To connect to MySQL with client side programs
« Reply #2 on: May 11, 2004, 09:32:28 PM »
Hi,

Did you ensure that you added the user to the database? You would create the database in Cpanel in MySQL databases, then create the user, then add the user to the database. If you only did 2 steps (and they are 3 separate steps), then you haven't added the user and need to do so. Click add user after selecting the database and the user in the drop down right beneath the database section.  After the user is added, there will be connection strings to Perl/cgi, php, and java.

Next, if you did add the user and it isn't working, what exact error are you receiving.  The error is an indication of the issue occurring.

Another point would be what exact program are you using to connect? Each program is slightly different and this is useful to know if you want someone to troubleshoot the issue.

Next, has your domain propagated? If it hasn't, you can't connect using it. You would need to use server.lunarpages.com where server is your server's name like galaxy.lunarpages.com or danzig.lunarpages.com, etc.

Finally, provide the exact settings you are using to connect for the fields that Anthony provided (other than your password). If you want me to test connecting, PM me your password. I can only do the testing, however, once all conditions above are answered and met, since I need the information for any testing.

Thanks.

Offline lig

  • Spaceship Navigator
  • *****
  • Posts: 82
How To connect to MySQL with client side programs
« Reply #3 on: May 11, 2004, 10:00:08 PM »
yes this is my fake root user (has all privileges to all databases).

Now why is it that I can access it from my test PC but not through the server itself (use address not localhost) when I have % as an Access Host?

Error message:
Warning: mysql_connect(): Access denied for user: 'maolek2_lig@cerga.lunarpages.com' (Using password: YES) in /nfs/home/******/functions.php on line 94
Life is a game... So have fun.

www.PHPCommunity.org: Open Source, Open Community
Visit for more information or to join the movement

Danielle

  • Guest
How To connect to MySQL with client side programs
« Reply #4 on: May 11, 2004, 10:23:13 PM »
If you connect remotely, you need to use your domain to connect for the host. If you connect locally via a page on your site on the server itself, you need to use localhost for the host.

Offline Nside

  • Trekkie
  • **
  • Posts: 12
same problems...
« Reply #5 on: September 02, 2004, 08:14:18 AM »
Hello,
I followed all of the steps above but am having the same problems.

I am using the MySQL ODBC drivers to access mySQL via MS Access.  I am trying to access the phpBB MySQL database on my website.

My server is quasor.lunarpages.com and I haven't transferred my domain yet so it is xxx.lunarpages.com.

Here is what I have done:

The database was already created by phpBB, it is named xxx_phpb1

I added another user to the database with all priviledges named xxx_user

I added an access host: %

MySQL connection parameters:
Host: quasor.lunarpages.com
db name: xxx_phpb1
username: xxx_user
port: 3306

I get this error: "Access denied for user 'xxx_user@dsl3-ip019-grr.wmis.net' (Using password: Yes)

Any ideas?  Thanks!

Offline 9x23w

  • Trekkie
  • **
  • Posts: 14
How To connect to MySQL with client side programs
« Reply #6 on: January 21, 2005, 10:44:44 AM »
Nside, did u ever resolve this problem?

I did exactlywhat u did and got the same error.

I was trying to connect with

mysql --host=mydomain.com  --user=myusername_newuser  --database=myusername_dbname

Anyone know how to connect remotely?

Offline GMTurner

  • Berserker Poster
  • *****
  • Posts: 7479
    • Turner's Lounge
How To connect to MySQL with client side programs
« Reply #7 on: January 21, 2005, 11:40:07 AM »
I was able to connect remotely (both through various apps, some self-written) and from the command line...

When I did it via the command line, I added the --password= to the command though... and once I fixed typos in my username, and such I was able to connect with a user I had added AFTER having added the host.... not that it should matter...
The above information may or may not reflect current policy, opinions, or views since it was likely made almost 10 years ago.

Offline fretnmore

  • Grandma Looney
  • Über Jedi
  • *****
  • Posts: 2841
    • Tri Wolf Studios
How To connect to MySQL with client side programs
« Reply #8 on: January 21, 2005, 12:10:54 PM »
I also use ODBC drivers to update my DB on LP from an access db.

These are the settings I have used (edited to make generic):

Host Server Name : www.domain.com
DBname: xxx_phpbb1
User: xxx_name
Password: yyyy
Port: 3306

This has been working for me.
Life is not measured by the number of breaths we take, but by the moments that take our breath away.
----------------------------------------------------------
Tri-Wolf Studios
Lunarpages Web Hosting
Lunarpages Forums
Lunarpages Affiliate Program

Offline 9x23w

  • Trekkie
  • **
  • Posts: 14
How To connect to MySQL with client side programs
« Reply #9 on: January 21, 2005, 02:10:51 PM »
Tried it again, it works as GMTurner indicated if u put the pw in the command line (it does not prompt u for a pw).  Thanks to all!

Offline voam

  • Newbie
  • *
  • Posts: 2
Re: How To connect to MySQL with client side programs
« Reply #10 on: November 17, 2006, 02:12:13 AM »
I was having very similiar problems. Interestingly, I had the same findings as GMTurner- that I could connect with a user created AFTER I had allowed access from my IP address, but the user in the database that existed before I had allowed connection from my host still cannot connect.

For example, here is the original error:
Access denied for user: 'denver6_xmb1@xx-xxx-xxx-xxx.my.isp.net',

even though my ip address was already granted permission. At one point I even tried the % as others have suggested, leaving it wide open.

Then I added another test user, and that person connected no problem, the only change being the user name and password, both of which I checked many times. So it seems the sequence of adding the hosts allowed access and the users in the database is a critical piece of getting this to work.

I hope I am wrong about this because I can see how this could cause problems down the line if I want to open the access to the data to other ip addresses. It seems it would require me to create new users as well.

Someone please correct me if I am wrong! :help:

Offline GMTurner

  • Berserker Poster
  • *****
  • Posts: 7479
    • Turner's Lounge
Re: How To connect to MySQL with client side programs
« Reply #11 on: November 17, 2006, 05:42:41 AM »
you might be able to remove/delete the username that was added before the host was created and then recreate it with the same username. Now, if you have lots of usernames you are granting outside access, this could be an issue, but with 1 or 2 it might be a little annoying to have to change as the IPs change it shouldn't be that bad...

The above information may or may not reflect current policy, opinions, or views since it was likely made almost 10 years ago.

Offline voam

  • Newbie
  • *
  • Posts: 2
Re: How To connect to MySQL with client side programs
« Reply #12 on: November 18, 2006, 09:07:59 AM »
GMTurner,

That is a good suggestion.  :clap:I had not thought of deleting and recreating a user with the same name. Should that issue arise, I will definitely give it a try.