Posted by:
RiggsFolly
(---.dynamic.dsl.as9105.com)
Hi Dac,
I think this is just a lack of understanding of the MySQL signon requirements.
A MySQL account has 2 parts, one is the userid and the second is the domain that that userid is allowed to connect from, hence the error message contains 'root'@'Pegasus', root is the userid and 'Pegasus' must be the domain.
By Domain in this situation it means some identification of the client PC and I guess its used the laptops name.
WAMP's MySQL comes with 3 default accounts and they are :-
root@127.0.0.1root@localhost
root@::1
So the 'root' userid is only allowed to connect to MySQL from these 3 domains (127.0.0.1, localhost, ::1 ) and these are 3 ways of saying ONLY THE PC RUNNING MySQL, its a security thing as root is the SUperUser and can do anything to databases.
So you will need to use phpMyAdmin to create another account that is allowed to connect from your client PC and it is normal to use its IP Address as the domain.
Its a good idea to leave the 'root' account as it is, and set a password on it for security, but thats another issue.
So I suggest you create another userid, lets say 'testing' and allow that account access from the above 3 domains and also your client PC's ip address as well.
So assuming the client PC is 192.168.2.7
testing@127.0.0.1testing@localhost
testing@::1
testing@192.168.2.7Adding User AccountsThen give all the required privilages to that account on the database you are using for this application.
As your laptops are probably getting allocated their ip address's using the routers DHCP server it would be a good idea to make both these PC's use a STATIC ip address
How to set static ip addressYou should then be able to connect from the Client PC to the MySQL server runninng on the other PC.
---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>Read The Manuals Apache --
MySQL --
PHP --
phpMyAdminGet your Apache/MySQL/mariaDB/PHP ADDONs here from the
WAMPServer alternate Repo-X-X-X-
Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-