Connection to MYSQL inside LAN

Support section for FREESCO v0.3.x 3rd Party Packages

Connection to MYSQL inside LAN

Postby ly9cs » Sun Dec 04, 2011 11:02 pm

I am running FREESCO 0.3.4
This is my system report

On my inside LAN I have a MYSQL 5.5 running and this I would like to access from my Apache in FREESCO.
I would be happy if I could send some PHP to MYSQL to access the DB:s running there but I have not figured how to jet?

I have changed the php.ini and added the MYSQL server.
Then tried to do a php-script to see if there is any connection
I found this script
Code: Select all
// we connect to and port 3307
$link = mysql_connect('mysql.inet:3306', 'root', 'MySecretPassWORD!!');
if (!$link) {
    die('Could not connect: ' . mysql_error());
echo 'Connected successfully';

// we connect to localhost at port 3307
$link = mysql_connect('', 'mysql_user', 'mysql_password');
if (!$link) {
    die('Could not connect: ' . mysql_error());
echo 'Connected successfully';

The return form my FREESCO is
Could not connect: Client does not support authentication protocol requested by server; consider upgrading MySQL client

Can some one perhatps tell me what I am doing wrong?
Is this possibel?
What do I need to change?
Do I need change the port on my FREESCO to admit the 3306 to MYSQL?

I have added this also

Re: Connection to MYSQL inside LAN

Postby Lightning » Mon Dec 05, 2011 7:56 pm

For mysql you should not use the root account for any access other than direct mysql commands. You need to create a new user with privileges.Something like this from a mysql command prompt logging is as root.
Code: Select all
mysql; GRANT ALL PRIVILEGES ON *.* TO New-User_Name@"%" IDENTIFIED BY 'passwordyouchoose' WITH GRANT OPTION;

Also if you have not set the root password you should using this command
Code: Select all
mysql: SET PASSWORD FOR root=PASSWORD('newpassword');
Make certain that every character is typed in.

After you have created the new-User_Name you can use that user name to login remotely. The root user can only be used directly from the mysql command prompt.

Also it would be helpful to let us know exactly what you are trying to accomplish and why?
A lot of the time there is easier or better ways of doing things.
If you are afraid that you might make a mistake. The chances are high that you will never learn anything.
User avatar
Posts: 12081
Joined: Wed Nov 14, 2001 6:50 am
Location: Oregon, USA

Re: Connection to MYSQL inside LAN

Postby dingetje » Tue Dec 06, 2011 8:00 am

The mysql client library in the FREESCO Apache package is for MySQL 3.x and authentication may not be compatible with a MySQL 5.x database. explains what can be done.

Code: Select all
mysql> UPDATE mysql.user SET Password = OLD_PASSWORD('newpwd')
    -> WHERE Host = 'some_host' AND User = 'some_user';

replace 'some_host', 'some_user' and 'newpwd' with the required values for your situation. Also make sure you've granted privileges to this user as described in the reply from Lightning.

"Software is like sex: it's better when it's free." - LINUS TORVALDS
User avatar
Posts: 1010
Joined: Wed Nov 14, 2001 12:13 pm
Location: The Netherlands

Return to 3rd Party Package Support for FREESCO v0.3.x

Who is online

Users browsing this forum: No registered users and 3 guests