Setting mysql server name with and without www [closed] - mysql

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I am using a mysql server on my linux ubuntu 10.04.
Everything is working fine, when I use example.com as the mysql server name.
When I use www.example.com as the mysql server name, the connection does not work. Where can I change the settings.
The URL of my website is working with www and without.
Is the mysql server name a setting in the mysql configuration or is it the hostname of my domain?

You can check your MySQL servers users table. When you see the user, edit it and set this value for the host he/she can connect to:
%example.com
The % is a wildcard for everything in front of "example.com". The second alternative is to add a new user<->host combination via CREATE USER http://dev.mysql.com/doc/refman/5.1/en/create-user.html
BUT ATTENTION: You should never, never, never connect to your MySQL from outside localhost. And if so, use an SSH Tunnel to do so.

Related

What does a mysql server id look like? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 8 years ago.
Improve this question
I am trying to connect to mysql server on one.com's phpmyadmin.
I am using dreamweaver setting up (atleast trying) mysql connection, but i don't know what to put in the 'mysql server' box.
Any help please?
Thanks in advance!
An ip address (192.168.xxx.xxx) or server name.
It's either the hostname (eg. localhost or mysql.example.com) or the IP of the server (eg. 127.0.0.1). You can find example values in the documentation:
MySQL Server: mysql1.myDomain.com
User Name: dbuser
Password: myPassword

Connection to MySQL on server via ODBC [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 9 years ago.
Improve this question
I'm writing a desktop application (in Delphi). I would like to connect to MySQL database on a server. Up till now I tested my application using MySQL installed on my local computer. I used ODBC connector and all tests went successfully. Problems have started when I tried to connect database on server via ODBC. I'm getting connection failed message all the time and I cannot do anything.
Please tell me, how should I connect to this MySQL?
By default, mysql listens for incoming connections on port 3306. Use can use telnet to test if a networking problem or firewall is preventing you from connecting to the server that MySQL is running on, using the following command:
telnet fqdn.of.mysqlserver.com 3306
If successful, you should see that it connects, followed by some encrypted gibberish from MySQL. If it doesn't connect, then the problem is a firewall, a networking problem, the MySQL server is unreachable, or something else blocking the connection.

Mysql remote connection [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I have two mysql db . One is 10.0.3.129, another is 10.0.3.139. I want to connect 10.0.3.129 from 10.0.3.139. Could someone tell me what should I do with 10.0.3.139 and 10.0.3.129 ? ? Thank you .
Make sure that MySQL port is open for connection from 10.0.3.139 to 10.0.3.129, verify using
telnet 10.0.3.129:<MySQL port> where you have configured your server.
Create a MySQL user in 10.0.3.139 like:
Create MySQL user in server by executing this query
CREATE USER 'test'#'10.0.3.139' IDENTIFIED BY 'test123';
and given proper permission to this user by using GRANT syntax.
Now try to connect using MySQL command line or any GUI tool from 10.0.3.139, it should work.

Why do I have a lot of root users in my Mysql? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I don't remember creating these users in my Mysql installation:
debian-sys-maint
phpmyadmin
And I have 3 Any users and 4 root users.
Here's the screen shot taken from Phpmyadmin:
http://imgur.com/AYwkxKn
And here's the command line version:
http://imgur.com/PWaccsV
Should I be wary of these users? Or is this the default?
A MySQL user is actually identified by a pair of username and hostname. 127.0.0.1, ::1, and localhost all allow you access from your local machine. Without them, you would not be able to connect. The only one that may be an issue is the ip-10.242.75.6, but I expect that is the machine's IP also?
As for the phpmyadmin and ANY users, the MySQL documentation says
The USAGE privilege specifier stands for “no privileges.” It is used
at the global level with GRANT to modify account attributes such as
resource limits or SSL characteristics without affecting existing
account privileges.
You would have a record for each user and each IP address that user is allowed to connect from.
These are permissions rather than separate user accounts. All it says is that, user root is allowed to connect from all those host addresses with ALL_PRIVILEGES. localhost, ::1 and 127.0.0.1 are the same machines address on which the SQL server is installed on.
The listed hosts on the picture are different name variations of localhost. these 2 users should be able to access localhost by any of these names, that's why there are created duplicates

Connect to Mysql database from client using Mysql Connector [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I want to make connection between my database on the server,that located on the internet and my application that runs on some client.
My application based on .Net framework and i using MySql Connector for .Net component.
After some searches i gain the server address for the server by execute php command below :
echo $_SERVER['SERVER_ADDR'];
And this command returns : 67.225.166.81
I can connect to database with php when the php files runs on the server.
I used the values for connection in my .Net win app and this is the connection string :
string connStr = "server=67.225.166.81;port=3306;database=navayeme_joomfa;user id=navayeme;password=*****;";
The win app trying to make connection and an exception thrown :
Authentication to host '67.225.166.81' for user 'navayeme#myclientIP' failed ...
The myclientIP is ip of my client.
How can i fix this problem?Is possible the server doesn't support for this type of connection?
Using MySQL database together with a php script run on the same server does not mean that you can connect to the MySQL database from another network. PHP runs without a problem because it can make connection to the MySQL server on server using either
regular TCP connection (locally)
UNIX socket files
Please check that MySQL accepts connections on port 3306. If firewall is used, please make sure that 3306 is allowed for incoming connection.