phpmyadmin server name change - mysql

I am really new in this kind of stuff so my question might be to easy or stupid but please do help this newbie.
When I opened my phpmyadmin, the server was named: mysql wampserver. Usually in tutorials, their server name was localhost. Can you please tell me how to change the name of the server if possible so I can use the tutorial easier if we have the same sever name.
Thank you in advance!

That name is absolutely irrelevant to anything. It is actually set in this file wamp\apps\phpmyadmin4.1.14\config.inc.php using this parameter
$cfg['Servers'][$i]['verbose'] = 'mysql wampserver';
It effects nothing and if it really bothers you you can amend it to anything you like
$cfg['Servers'][$i]['verbose'] = 'Mackinley Databases on my PC';

The WAMP server doesn't maintain a name. You connect to it via an IP address... do you not know the IP of the machine it's installed on?
If it's on your own computer, you can connect to the Sql server from code by connecting to 127.0.0.1:3306 (default port).
If it's not on your machine, find the ip address of the machine it's running on by going to the command prompt and typing 'ipconfig'.
Then use that IP address and port 3306 (or whatever port you defined, 3306 is just default)
Default access will be via localhost or 127.0.0.1. Might not work (rarely) if it was modified before.
Also Check you Host file. make a copy of before editing host file ..

Related

what is the server name of mySQL hosted on EC2?

I have installed LAMP on my EC2, running mariaDB.
So now I would like to connect to mySQL, but what should my $servername be in the .php file (where i store the db_connect details)?
I've tried the Public DNS (IPv4) address of the instance provided on the EC2 dashboard, however, I am getting connection fail error when I run the .php files.
Am i using the right server name here?
Or is it because I need to set some access rights regarding Security group? I've added port 3306,tcp,0.0.0.0/0 to the Security Group but still getting the "Connection failed: Access denied for user 'root'#....."
I've also checked the my.cnf, which i assume it should not have any bind address values in it?
It seems this is credentials issue, port listening seems working fine. Are php files running on same box? if so, use "localhost", that should work fine. Here is tutorial on how to enable remote connections.
Good luck!

Connecting to a local MySQL server

I would be grateful if someone could provide some help on how to connect to a local MySQL server (computer) from my laptop which is on the same local network.
I downloaded/installed MySQL on Windows (Installer & Tools) on the laptop and computer and I think they're both up and running.
When I try to 'create a connection' on my laptop within MySQL Workbench, I just can't seem to connect and I've tried various usernames and passwords. Do I need to configure the settings on the desktop server?
Thanks in advance
The key word is "think". You need to know that the server is up.
Open a command shell and type "netstat -a". You'll see every listener on every port.
If you see that something's LISTENING on port 3306, then it's most likely MySQL.
If port 3306 doesn't appear, you have your answer.
You need to know that the listener is running on the database machine you'd like to connect to.
Once you ascertain that the listener is up and running, you need to know that your client has been GRANTed permission to connect via username and password. Only the DA for the database can set that up and let you know.

mysql error 2005 - Unknown MySQL server host 'localhost'(11001)

I was using mysql 5.6.11,it usually turned down and show me this:
2005 - Unknown MySQL server host 'localhost'(11001).
Currently my resolution is to turn off the network,than it return to normal.I had searched a lot,but no answer is revalent to it.So,does anyone knows the reason?
ERROR 2005 (HY000): Unknown MySQL server host 'localhost' (0)
modify list of host names for your system:
C:\Windows\System32\drivers\etc\hosts
Make sure that you have the following entry:
127.0.0.1 localhost
In my case that entry was 0.0.0.0 localhost which caussed all problem
(you may need to change modify permission to modify this file)
This performs DNS resolution of host “localhost” to the IP address 127.0.0.1.
I have passed through that error today and did everything described above but didn't work for me. So I decided to view the core problem and logged onto the MySQL root folder in Windows 7 and did this solution:
Go to folder:
C:\AppServ\MySQL
Right click and Run as Administrator these files:
mysql_servicefix.bat
mysql_serviceinstall.bat
mysql_servicestart.bat
Then close the entire explorer window and reopen it or clear cache then login to phpMyAdmin again.
The case is like :
mysql connects will localhost when network is not up.
mysql cannot connect when network is up.
You can try the following steps to diagnose and resolve the issue (my guess is that some other service is blocking port on which mysql is hosted):
Disconnect the network.
Stop mysql service (if windows, try from services.msc window)
Connect to network.
Try to start the mysql and see if it starts correctly.
Check for system logs anyways to be sure that there is no error in starting mysql service.
If all goes well try connecting.
If fails, try to do a telnet localhost 3306 and see what output it shows.
Try changing the port on which mysql is hosted, default 3306, you can change to some other port which is ununsed.
This should ideally resolve the issue you are facing.
Follow these steps to fix this error
Use \connect root#127.0.0.1 instead of \connect root#localhost
if it doesn't work then go to C:\Windows\System32\drivers\etc\hosts and check the IP address attached to host name.
use that IP, so it will be.
\connect root#the_ip_address_you_found

VB.net - Connect to Database

I got mysql database in the phpmyadmin, and i try to connect to the database from my application.
My connection string is:
Server=12.919.18.12;Port=3306;Database=hbd;Uid=hb;Pwd=123;
An exception occurs:
"Unable to connect to any of the specified MySQL hosts."
Do I need to install mysql or something?
(I just imported MySql.Data.dll and tryied it. Is there anything I have forgotten? I checked the ip pinging my website).
Connection strings for MySQL
is pretty helpful in terms of connection strings. Your connection
string seems to be invalid.
You may check mysql server is working or not and you can add port number of mysql in connection string like this
"Server=myServerAddress;Port=1234;Database=myDataBase;Uid=myUsername;Pwd=myPassword;"
Other reason MySql might be configured to listen to only the local host.
Follow the following links for more information:
Enabling MySQL Remote Access - MySQL connection only works from local machine
Unable to connect to any of the specified MySQL hosts.
IP is invalid 12.919.18.12
Server=12.919.18.12;Port=3306;Database=hbd;Uid=hb;Pwd=123;
IP block is < 256
If the datababase is local, try localhost or 127.0.0.1 as the IP address.
Is the server on your network? If so, the IP is invalid. If I were you, I'd try to check the IP with the person who gave it to you.
the connection string is correct but as ive read a lot of forums they all have the same problems as you do. my solution is that if your trying to create a network base system on a LAN type network you should use XAMPP or WAMPP but i prefer xampp and double check if your accounts or users have an Admin or any other user name for your connection and then see if they have granted all the privileges and with password of course.
Here is the ff instructions:
Open Xammp
Then open a web browser then open 127.0.0.1 or localhost.
click phpmyadmin then at the top click privileges.
add user and make it sure allow all privileges and check all access.
then connect again using the same connection string with the proper user and password.
This issue is RESOLVED :)
try to put the PORT in the end like :
"Server=12.919.18.12;Database=hbd;Uid=hb;Pwd=123;Port:3306;"

Connecting to MySQL from other machines

I have MySQL installed on a Windows 2003 server on our domain. I cannot connect to it from other machines on the domain. I open up the MySQL Administrator panel and try to change the server name from localhost to the machine name it does not recognize it. I have tried fully qualifying the name also. Any ideas what I need to change?
What sort of error, a total inability to connect? Windows Firewall is the first place I'd look, to make sure port 3306 is open.
have you double checked permissions on the databases using something like
grant all priviliges on 'database'.'*' to 'username'#'remote_machine_ip' identified by 'password';
Like Sukasa mentioned, also double check any firewalls you may have configured
You need to look in the my.cnf file and look for the bind-address setting and the skip-networking setting. You want the latter removed or commented out and the former to be the machine's IP address. Restart MySQL after you make changes.
A number of MySQL install packages defaulted to a local socket only install, which is helpful for security but considerably impairs network connectivity. :-)
I was trying to connect to the database using the default root userid. I created a new user and gave this user read permission to the needed tables.