Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accessing MySql on Linux server on LAN

Status
Not open for further replies.

ChrisRChamberlain

Programmer
Mar 23, 2000
3,392
GB
Hi all

Have similar problem to that in thread54-1532148 and have yet to resolve the issue.

Running Ubuntu Server 10.04 with a mix of Windows boxes on a LAN.

MySQL running on the Linux server and accessible by command line, Webmin, phpMyAdmin etc.

Samba also running but no shares specific to MySql folders.

Can ping the server and port 3306 is forwarded to the server.

Windows Firewall has port 3306 open.

Have tried
Code:
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY 'password';
which I assume is incorrect.

DSN fails with SQL_ERROR

Suggestions please?

TIA

FAQ184-2483​
Chris [pc2]
PDFcommander.com
motrac.co.uk
 
the problem is with 'localhost'
you are only allowing access from the pc that MySQL is running on
if you wish to access from a remote pc you need to enable it for network connections as well

as you have phpmyadmin running I would sugest that is the easiest way to set permissions.
 
In MySQL, the wild card is the % sign. I don't have the reference handy, by I believe the syntax would be ... TO 'root'@'%' INDENTIFIED ... This will be wide open and will accept a root login from anywhere. You can use the wild card in combination with other things such as as host on a LAN (%.local.lan) to help contain the access.

You may need to either restart MySQL or at least flush the users to get it to take effect.

I thought I would also mention that it is probably not a good idea to use the root account in this manner due to the privilege level associated with the account.
 
Noway2

Thanks for your reply.

Added
Code:
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password';
and that appears in the list when viewed by phpMyAdmin.

Having rebooted the server, the ODBC 3.51 error is
Code:
Request returned with SQL_ERROR.
The ODBC 5.1 error is
Code:
Connection failed: [HY000][Mysql][ODBC 5.1 Driver]Can't connect to MySql server on 'ubuntubackup'(10061)

FAQ184-2483​
Chris [pc2]
PDFcommander.com
motrac.co.uk
 
a little late now you have resolved the problem but once you sign in to phpmyadmin on the home page you should have an option for priviliges
 
Are you doing this to give access to all of the Windows systems to administer the database, or just to read and update it?

If it's the former it may be a good idea to add another user for that purpose, and leave the root user restricted to logins from localhost.

Annihilannic.
 
IPGuru

Thanks - I did ultimately use phpMyAdmin in the way you have suggested.

Annihilannic

Thanks also - the Windows clients need all priviledges so another user has been added.

FAQ184-2483​
Chris [pc2]
PDFcommander.com
motrac.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top