Jump to content
  • 0

Control Panel to MySQL Database


Katazui

Question


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  167
  • Reputation:   22
  • Joined:  11/23/11
  • Last Seen:  

Hi.

This is a problem I've been facing for a long time now...

I'm hosting my SpookyRO Website with http://x10hosting.com/ and have installed a Flux Control Panel. On the other side, my server is running on my 24/7 PC, which has the server files and MySQL Database in it and what not. But, for the Control Panel to work I need to connect my MySQL Database server to the website with the control panel. Sadly, in the configuration for the flux control panel, I cannot use Localhost to connect to my database. So, my question is how do I change my MySQL Hostname to something besides 127.0.0.1? Or how do I make my MySQL Database online? For websites like these to connect to?

I know this works. I've had a hostname besides 127.0.0.1 for mysql, but, I didn't remember how I did that. But, then it was gone. I can no longer connect to that database. But still have my database files. How do I make my MySQL Database online? So my control panel can connect to it?

Thanks!

Link to comment
Share on other sites

12 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

  1. setup your router to forward port 3306 (the MySQL port) to your computer's LAN IP
  2. then open your FluxCP file /config/servers.php and in the 2 MySQL database config sections, change 'Hostname' to your WAN IP (click here to see what your WAN IP is)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  167
  • Reputation:   22
  • Joined:  11/23/11
  • Last Seen:  

Oh snap... Is that all you have to do?

So, I went to my 192.168.1.1. And forward port to my computer with 3306. And I cannot connect to SQL with my MySQL Query Browser.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

I cannot connect to SQL with my MySQL Query Browser.

When you use programs on your computer, use 127.0.0.1 or localhost to connect.

When you are on any other computer on your LAN, use your computer's LAN IP to connect.

Only for computers on the "outside" internet (this includes your webhost where FluxCP is): then use your WAN IP to connect.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  167
  • Reputation:   22
  • Joined:  11/23/11
  • Last Seen:  

So...

My Hosting PC that has my database, I'm using "127.0.0.1", "3306", "root", and my "password", it works.

Using the same WIFI network... using my mac to connect my query database to my hosting pc. The "LAN IP for the PC", "3306", "root", and my "password". Wouldn't work.

My CP... "WAN IP", "3306", "root", and my "password". Wouldn't work.

I have port forward my HostingPC with 3306 and it wouldn't work. What's wrong?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

What is the MySQL error message (or error number) ?

If it's the "access denied" message, it means you're able to connect to the MySQL Server, but the user/password you are connecting with do not have privileges from the IP they are connecting from.

A default MySQL install only sets up 'root'@'localhost' so that's why you are only able to connect from localhost.

I forget if you use MySQL Query Browser or MySQL Workbench to add/edit MySQL users.. (I use different program, SQLyog and sometimes Navicat).

Use one of those programs to add a new MySQL users like:

'pick_an_username'@'your_Mac's_LAN_IP'

'another_username'@'your_cp's_WAN_IP'

and give the users permissions on your ragnarok database(s).

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  167
  • Reputation:   22
  • Joined:  11/23/11
  • Last Seen:  

How do I change the permissions? What do I do?

Here's my error. I actually tried using Ceres cause I feel it's much simpler. I still get the same errors.

Warning: mysqli_connect() [function.mysqli-connect]: (HY000/2003): Can't connect to MySQL server on 'MyWAN' (110) in /CP/install/install.php on line 49

Can't connect to Ragnarok MySQL server. Press back and check your MySQL host, user, password.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

How do I change the permissions?

Depends which program you are using.

In SQLyog, this is how I add a new user:

  1. click the User Manager icon to open the User Manager window
  2. click Add New user
  3. on the next screen, enter the Username, Host, Password and click Create
  4. then select a database on the left, check the privileges you want to give the new user, then click Save Changes

qyea1u.png

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  167
  • Reputation:   22
  • Joined:  11/23/11
  • Last Seen:  

I'm using MySQL Admin. Made my User with the permissions.

So, for Ceres, do I put my root for my Ragnarok User or the User I just created?

I am getting the same errors

Warning: mysqli_connect() [function.mysqli-connect]: (HY000/2003): Can't connect to MySQL server on 'WAN IP' (110) in /CP/install/install.php on line 49

Can't connect to Ragnarok MySQL server. Press back and check your MySQL host, user, password.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  52
  • Reputation:   2
  • Joined:  12/21/12
  • Last Seen:  

You need to use your newly created mysql user

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  167
  • Reputation:   22
  • Joined:  11/23/11
  • Last Seen:  

You need to use your newly created mysql user

Of course I did that. It still would not connect.

Maybe I'm entering the information wrong?

Ragnarok Host = WAN IP
Ragnarok User = "root"
Ragnarok Password = "mypassword"
Ragnarok DB = "SpookyRODB"
Ragnarok Log DB = "SpookyRODB"
CeresCP Host = WAN IP
CeresCP User = "root"
CeresCP Password = "mypassword"
CeresCP DB = "SpookyRODB"
MD5 Pass = I honestly don't know what to put...
Safe Pass = Same goes for here, Yes or No?

This is Ceres Control Panel.

Edited by Katazui
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  167
  • Reputation:   22
  • Joined:  11/23/11
  • Last Seen:  

Somebody?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  167
  • Reputation:   22
  • Joined:  11/23/11
  • Last Seen:  

I finally bought a host, I finally got a good control panel. Instead of ceres, I'm using flux. Yay! I'm sorry if I'm taking out your time, but I really need with my control panel. http://www.SpookyRO.com/

 

At this point I'm trying to connect my webhost (http://www.hosting24.com/) to my MySQL Database on my computer at home. But everytime I try to use my home host, the error code would show "root@localhost", when it's supposed to be "root@myhostname", but every random host name I put it would show "root@localhost". I'm not sure if it's something in the Flux CP that's doing it, or it's something else. Any ideas?  Right now the hostname is localhost using the localhost database on the webhost. 



Fo' reals.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...