Sponsored Content
Operating Systems Linux MySQL server connetction problem Post 302086639 by this213 on Friday 25th of August 2006 10:32:37 AM
Old 08-25-2006
Corona688, I think you're thinking of Postgres. MySQL usually installs by default listening on port 3306. This simply doesn't do anyone any good because, by default, the only users within MySQL are assigned to localhost.

lancepanda, you need to add a user for the IP you want to conenct from to MySQL. Log into the machine MySQL is running on, then:
Code:
If you haven't added any MySQL users yet:
$ mysql 
Otherwise:
$ mysql -uADMIN_USER -pMY_PASSWORD

mysql>GRANT ALL PRIVILEGES ON database.* TO your_username@'123.123.123.123' IDENTIFIED BY 'your_password' WITH GRANT OPTION;

mysql>exit;

Replace ADMIN_USER with the username of someone with authority to create new users, database with the database you want to connect to (or * for all), your_username and your_password with the proper values and 123.123.123.123 with your IP address. Be sure to leave the single quotes where they are as well as the semicolon at the end. Optionally, you may limit the privileges by replacing "ALL" with a comma delimited list of privileges (see the mysql manual for more information).

I'll also suggest you use The MySQL Control Center if you're not already. It's not version 1 yet, but beats The MySQL Administrator/Query Browser combo hands down - plus it makes user administration on your MySQL server very straightforward.

Also, as Corona688 said: The answers given here are used by other people in your same situation and you really should go back and edit your email address out of that post.
 

8 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

MySQL problem >> missing mysql.sock

MySQL on my server is down.... I figured out that the mysqld process isn't running. When I try to run it, it says it can't find mysql.sock Any suggestions? Here's what I can't do: can't be root don't have physical access (do stuff via SSH) reinstall MySQL (need to keep the current MySQL... (8 Replies)
Discussion started by: _hp_
8 Replies

2. Shell Programming and Scripting

Mysql problem

No help guys??? :( Hi guys, i've got a question here... my intention is to write a script that would access a mysql db and extract some info and paste it into a file... so the first move would be, to access the mysql interface right? hence... #! /usr/bin/ksh echo "Job Begin: " `date` ... (1 Reply)
Discussion started by: 12yearold
1 Replies

3. Shell Programming and Scripting

Trying to connect MYSQL server from HP-UX

Hi everyone, I have an urgent requirement to get some table data from Linux-MYSQL server from HP-UX with oracle database.Is there any way we can get connected through Shell script from HP-UX and issue select on mysql to get some table data? Please help me out. (7 Replies)
Discussion started by: kashik786
7 Replies

4. Web Development

MySQL Server Crashing need Help

Hi, we have some problem with mysql high cpu , would like some help with MySQL Tuning here are the mysqltuner & tuning-primer details mysqltuner: # mysqltuner >> MySQLTuner 1.1.1 - Major Hayden <major@mhtx.net> >> Run with '--help' for additional options and output filtering --------... (1 Reply)
Discussion started by: cataplexy
1 Replies

5. Linux

mysql server start issue

Hi, I have installed mysql in linux box as mysql-5.0.77-4.el5_6.6.. I would like to start the server. But there is no mysql file in this location /etc/init.d/ Please advice how to start the server now !! Thnaks, Mani (5 Replies)
Discussion started by: Mani_apr08
5 Replies

6. Emergency UNIX and Linux Support

New centos dedicated server - cant get mysql working

Hi all, I installed centos 5, with LAMP. httpd is working fine, ssh, ftp all working ok. But, when I try to use mysql its not, when I give the command mysql I get ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) (4 Replies)
Discussion started by: lawstudent
4 Replies

7. UNIX and Linux Applications

MySQL optimization or why the server is worsened

Hello Please advise me how can I optimize my MySQL server. Or advise which way to look. Maybe someone had similar problems? Over the past two weeks the MySQL server dropped 2 times. I began searching for ways to optimize the server. Overall the picture like that: There is a separate... (2 Replies)
Discussion started by: sergibondarenko
2 Replies

8. UNIX and Linux Applications

Mysql for HP-UX server

Gd evening I am trying to run my website made in php-mysql on a HP-UX system but dont know how to install and run services of Mysql. Kindly provide appropriate solution. thanks in advance. (1 Reply)
Discussion started by: kumar.ashishcs
1 Replies
MYSQL_GET_PROTO_INFO(3) 						 1						   MYSQL_GET_PROTO_INFO(3)

mysql_get_proto_info - Get MySQL protocol info

SYNOPSIS
Warning This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQL extension should be used. See also MySQL: choosing an API guide and related FAQ for more information. Alternatives to this function include: omysqli_get_proto_info(3) int mysql_get_proto_info ([resource $link_identifier = NULL]) DESCRIPTION
Retrieves the MySQL protocol. o $ link_identifier -The MySQL connection. If the link identifier is not specified, the last link opened by mysql_connect(3) is assumed. If no such link is found, it will try to create one as if mysql_connect(3) was called with no arguments. If no connection is found or established, an E_WARNING level error is generated. Returns the MySQL protocol on success or FALSE on failure. Example #1 mysql_get_proto_info(3) example <?php $link = mysql_connect('localhost', 'mysql_user', 'mysql_password'); if (!$link) { die('Could not connect: ' . mysql_error()); } printf("MySQL protocol version: %s ", mysql_get_proto_info()); ?> The above example will output something similar to: MySQL protocol version: 10 mysql_get_client_info(3), mysql_get_host_info(3), mysql_get_server_info(3). PHP Documentation Group MYSQL_GET_PROTO_INFO(3)
All times are GMT -4. The time now is 06:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy