Jump to content
  • 0

FLUX CP Error: is not allowed to connect to this MySQL server


Raijin

Question


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  29
  • Reputation:   0
  • Joined:  09/10/13
  • Last Seen:  

I get this error when im trying to configure FluxCP.

 

I have tried to open ports but it has brought nothing.

My database have grand acces.

What im doing wrong?

 

Greets Raijin

Exception Details       

Error: PDOException

        

Message: SQLSTATE[HY000] [1130] Host '--save' is not allowed to connect to this MySQL server

        

File: /var/www/lib/Flux/Connection.php:81             
                    
File	Line	Function/Method
/var/www/lib/Flux/Connection.php	81	PDO::__construct()
/var/www/lib/Flux/Connection.php	94	Flux_Connection::connect()
/var/www/lib/Flux/Connection.php	159	Flux_Connection::getConnection()
/var/www/modules/install/index.php	17	Flux_Connection::getStatement()
/var/www/lib/Flux/Template.php	337	include()
/var/www/lib/Flux/Dispatcher.php	168	Flux_Template::render()
/var/www/index.php	177	Flux_Dispatcher::dispatch()

        
        
Exception Trace As String

        

#0 /var/www/lib/Flux/Connection.php(81): PDO->__construct(*hidden*)
#1 /var/www/lib/Flux/Connection.php(94): Flux_Connection->connect(Object(Flux_Config))
#2 /var/www/lib/Flux/Connection.php(159): Flux_Connection->getConnection()
#3 /var/www/modules/install/index.php(17): Flux_Connection->getStatement('SELECT VERSION(...')
#4 /var/www/lib/Flux/Template.php(337): include('/var/www/module...')
#5 /var/www/lib/Flux/Dispatcher.php(168): Flux_Template->render()
#6 /var/www/index.php(177): Flux_Dispatcher->dispatch(Array)
#7 {main}


Link to comment
Share on other sites

11 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  707
  • Reputation:   168
  • Joined:  01/26/12
  • Last Seen:  

Hi Raijin,

 

This issue has been gone over, so many times; did you use the search function?

 

The MySQL user you are using, requires to have the host set as '%' or at least duplicated with the IP of your webhosting as the host. That's why it's un-able to connect, because the MySQL user you are using, is not allowed to be accessed by your webhost.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  29
  • Reputation:   0
  • Joined:  09/10/13
  • Last Seen:  

i have done this:  http://www.cyberciti.biz/tips/how-do-i-enable-remote-access-to-mysql-database-server.html

 

 

 

but still not working :( maybe i do something wrong

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  707
  • Reputation:   168
  • Joined:  01/26/12
  • Last Seen:  

Hi Raijin,

 

Since you are using the command terminal; then try doing this in SSH/Terminal.

 

Log into MySQL using this command (replace USERNAME)

mysql -u USERNAME -p

 

Then begin to modify your MySQL user to allow any host to connect (replace USERNAME, and command is CaSe-SeNsiTivE)

use mysql;
update user set host='%' where User='USERNAME';
flush privileges;
quit

 

After this, try using the MySQL user for your FluxCP.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  29
  • Reputation:   0
  • Joined:  09/10/13
  • Last Seen:  

i cant login to mysql with my root account :(

what happend omg 5 mins ago i could go in but now its not working

 

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
The password is the right one but i dont know why its not working i try it so many times and my capslock is not on

 

EDIT: I changed the password but it still not working.

I think its not the fault of the password i got denied i dont know why. Im a noob in linux :/

Edited by Raijin
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  707
  • Reputation:   168
  • Joined:  01/26/12
  • Last Seen:  

Hi Raijin,

 

Eh, perhaps this guide will help you out in resolving your issue; https://asurahosting.com/forum/index.php?/topic/3-mysql-password-reset/

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  29
  • Reputation:   0
  • Joined:  09/10/13
  • Last Seen:  

After trying diffrent sollution i just have uninstalled mysql und phpmyadmin and reinstalled again.

 

now i have this error.

Exception Details

Error: PDOException

Message: SQLSTATE[HY000] [2013] Lost connection to MySQL server at 'reading initial communication packet', system error: 111

File: /var/www/lib/Flux/Connection.php:81
File 	Line 	Function/Method
/var/www/lib/Flux/Connection.php 	81 	PDO::__construct()
/var/www/lib/Flux/Connection.php 	94 	Flux_Connection::connect()
/var/www/lib/Flux/Connection.php 	159 	Flux_Connection::getConnection()
/var/www/modules/install/index.php 	17 	Flux_Connection::getStatement()
/var/www/lib/Flux/Template.php 	337 	include()
/var/www/lib/Flux/Dispatcher.php 	168 	Flux_Template::render()
/var/www/index.php 	177 	Flux_Dispatcher::dispatch()

 

EDIT : think i know my error:

 

When i use telnet 127.0.0.1 3306 its working.

BUT When i use it with my server IP its not working:

PHost 'hostname' is not allowed to connect to this MySQL serverConnection closed by foreign host.

 

BUT I have edited my.cnf:

 

[mysqld]
#
# * Basic Settings
#
user        = mysql
pid-file    = /var/run/mysqld/mysqld.pid
socket        = /var/run/mysqld/mysqld.sock
port        = 3306
basedir        = /usr
datadir        = /var/lib/mysql
tmpdir        = /tmp
language    = /usr/share/mysql/english
skip-external-locking
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address        = 0.0.0.0
#
 


 

I read some where when i put bind-address to 0.0.0.0 the mysql server will listen to everyting.

I tried to open ports but its not working.

 

 

EDIT2:

I used this to open ports:

iptables -A INPUT -p tcp --dport 3306 -s my.ip.addres -j ACCEPT

Is this right?

Have i do something wrong?

 

EDIT3:

Im using telnet serverip 3306

and its working. 

But when i try to open Flux CP its comes error again.

 

Message: SQLSTATE[28000] [1045] Access denied for user 'xxx' (using password: YES)

Edited by Raijin
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  707
  • Reputation:   168
  • Joined:  01/26/12
  • Last Seen:  

Hi Raijin,

Where is your web hosting located?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  29
  • Reputation:   0
  • Joined:  09/10/13
  • Last Seen:  

In my server

EDIT:
do you mean /var/www/
Where i put my folders for webpages???

 

Or do you mean my Server location? Its in münich :D Germany.

 

EDIT:
 

I dont know how but I get it managed it to work. But i just want to install it new so i deleted the whole folder and put the same Flux CP again.

But know i cant install it via php.

How can i make it to install it again?

Are there still files i havent deleted?

Edited by Raijin
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  707
  • Reputation:   168
  • Joined:  01/26/12
  • Last Seen:  

Hi Raijin,

 

Why can't you install it via php? Simply drop all the cp_* tables from your RO database in MySQL and then proceed to install.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  29
  • Reputation:   0
  • Joined:  09/10/13
  • Last Seen:  

thx Asura you are great /no1 /no1 /no1

 

 

 

 

EDIT:

Sorry to open it again.

 

I changed my FluxCP. But know its always wants to have ragnarok as username and ragnarok as password for mysql connection.

But I already edited servers.php and i can see the changes with WinSCP.

Edited by Raijin
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  120
  • Reputation:   3
  • Joined:  07/04/13
  • Last Seen:  

what is cp_?

Link to comment
Share on other sites

×
×
  • Create New...