You are viewing our Forum Archives. To view or take place in current topics click here.
Creating phpmyadmin server | Help me
Posted:
Creating phpmyadmin server | Help mePosted:
Status: Offline
Joined: Nov 05, 201311Year Member
Posts: 2,749
Reputation Power: 452
Status: Offline
Joined: Nov 05, 201311Year Member
Posts: 2,749
Reputation Power: 452
background info:
I have a domain provider that has phpmyadmin setup and ready to use for noobs like me. But they limit the storage to 1gb. Since I am working on a social media project, I will need more than that. This is when I decided to buy a server from my provider. I bought a CentOS 6 server. I can easily switch os if need to though.
Problem:
I have setup my server multiple times. I made a Lamp server then installed phpmyadmin on it. I got everything working. I can sign in on my computer and create databases tables etc.
But when I run my php connection file through my website, I keep getting the error that says:
My php code:
I know the password is the right password because I have tested the commands through the console and it works.
If some would could tell me how I can fix this that would be great! I've been stuck on this for about 48 hours and I'm not finding any solutions.
BTW if I didn't mention before my domain is on a separate server.
Edit: I created a user and granted it all permissions, it is accessible from any host.
This works but it is not secure. When I try to change the host to the ip of my domain, it does not work.
Last edited by CriticaI ; edited 4 times in total
I have a domain provider that has phpmyadmin setup and ready to use for noobs like me. But they limit the storage to 1gb. Since I am working on a social media project, I will need more than that. This is when I decided to buy a server from my provider. I bought a CentOS 6 server. I can easily switch os if need to though.
Problem:
I have setup my server multiple times. I made a Lamp server then installed phpmyadmin on it. I got everything working. I can sign in on my computer and create databases tables etc.
But when I run my php connection file through my website, I keep getting the error that says:
'root@localhost'@'infong1583.lxa.perfora.net'
My php code:
<?php
$host_name = "107.180.**.***";
$database = "db0003";
$user_name = "root";
$passworddb = "my password";
$connect = mysqli_connect($host_name, $user_name, $passworddb, $database);
?>
I know the password is the right password because I have tested the commands through the console and it works.
If some would could tell me how I can fix this that would be great! I've been stuck on this for about 48 hours and I'm not finding any solutions.
BTW if I didn't mention before my domain is on a separate server.
Edit: I created a user and granted it all permissions, it is accessible from any host.
This works but it is not secure. When I try to change the host to the ip of my domain, it does not work.
Last edited by CriticaI ; edited 4 times in total
#2. Posted:
Status: Offline
Joined: Jun 25, 201113Year Member
Posts: 163
Reputation Power: 6
Status: Offline
Joined: Jun 25, 201113Year Member
Posts: 163
Reputation Power: 6
Have you tried to whitelist the ip your php connects from?
- 0useful
- 0not useful
#3. Posted:
Status: Offline
Joined: Nov 05, 201311Year Member
Posts: 2,749
Reputation Power: 452
Status: Offline
Joined: Nov 05, 201311Year Member
Posts: 2,749
Reputation Power: 452
With zero luck yesterday, I started over and made a new server.
but I still get an error.
I updated he code. It keeps denying access to the root user, even though I have the right credentials.
but I still get an error.
I updated he code. It keeps denying access to the root user, even though I have the right credentials.
- 0useful
- 0not useful
#4. Posted:
Status: Offline
Joined: Nov 05, 201311Year Member
Posts: 2,749
Reputation Power: 452
Status: Offline
Joined: Nov 05, 201311Year Member
Posts: 2,749
Reputation Power: 452
BeezyModz wrote contact them
They won't be able to help me.
It is not a server problem.
It is either my php code,
Or some kind of ip permission problem.
- 0useful
- 0not useful
#5. Posted:
Status: Offline
Joined: Mar 20, 20168Year Member
Posts: 301
Reputation Power: 25
Status: Offline
Joined: Mar 20, 20168Year Member
Posts: 301
Reputation Power: 25
ohok
- 0useful
- 0not useful
#6. Posted:
Status: Offline
Joined: Sep 27, 201113Year Member
Posts: 220
Reputation Power: 8
Status: Offline
Joined: Sep 27, 201113Year Member
Posts: 220
Reputation Power: 8
CriticaI wroteBeezyModz wrote contact them
They won't be able to help me.
It is not a server problem.
It is either my php code,
Or some kind of ip permission problem.
Have you create a user to use phpMyAdmin because I know some services require you to have a user...
- 0useful
- 0not useful
#7. Posted:
Status: Offline
Joined: Jun 11, 200915Year Member
Posts: 9,897
Reputation Power: 3160
Motto: "I'l no I grew up to fast speed I no u will be little famous" - Famous_Energy
Motto: "I'l no I grew up to fast speed I no u will be little famous" - Famous_Energy
Status: Offline
Joined: Jun 11, 200915Year Member
Posts: 9,897
Reputation Power: 3160
Motto: "I'l no I grew up to fast speed I no u will be little famous" - Famous_Energy
$user_name = "root";
- 1useful
- 0not useful
#8. Posted:
Status: Offline
Joined: Nov 05, 201311Year Member
Posts: 2,749
Reputation Power: 452
Status: Offline
Joined: Nov 05, 201311Year Member
Posts: 2,749
Reputation Power: 452
speed wrote$user_name = "root";
That worked, but it is allowed to be accessed from any host
How do I make it more secure?
- 0useful
- 0not useful
#9. Posted:
Status: Offline
Joined: Jun 11, 200915Year Member
Posts: 9,897
Reputation Power: 3160
Motto: "I'l no I grew up to fast speed I no u will be little famous" - Famous_Energy
Motto: "I'l no I grew up to fast speed I no u will be little famous" - Famous_Energy
Status: Offline
Joined: Jun 11, 200915Year Member
Posts: 9,897
Reputation Power: 3160
Motto: "I'l no I grew up to fast speed I no u will be little famous" - Famous_Energy
CriticaI wrotespeed wrote$user_name = "root";
That worked, but it is allowed to be accessed from any host
How do I make it more secure?
Host access is managed in MySQL itself, not the connector.
If you can connect from any host, that means the user is probably configured to allow wildcard access (user@%), so you should update the user to only allow connections from the host you want ([email protected])
- 0useful
- 0not useful
You are viewing our Forum Archives. To view or take place in current topics click here.