SQL database Localhost
Autor: David B.
Besucht 4168,
Followers 1,
Geteilt 0
I have created a MySQL database on my local computer. It has 1 table.
I can see the table and the data (680 rows) using TOAD For MySQL... so the MySQL engine is working and the database and table are ok.
I am publishing the website to my local c: drive (C:\WebSite X5 - Websites\MySecondWebSite).
The Host is Localhost (MySQL running on my computer) and the database is NutrawayConsultants2018, the table is Consultantssql
I have entered this data in the specification panel.
I thought that the Host: value may be incorrect... I tried "Localhost", "\\Localhost", and "David-PC" (the name of my computer).
How can I display the data table?
Gepostet am
localhost should be just localhost no / \ or "
You could watct this video : https://www.youtube.com/watch?v=ybD0a0t2fkU
Kind regards
John S.
Using IP should also function
Address of course
Autor
Thanks for the help... but I need some clarification...
??? I tried 'localhost' and it didn't work.
IP didn't work...
Toad is running... I know how to use Toad to create the database and table... as mentioned it is working fine. I can see the database and the rows in the table when I use Toad.
My problem is... I can't see the table on a page created by WebSite X5 with a data viewer object.
I don't understand 'Address of course'. I am publishing the website to my local computer here at home... not to a hosting site... hense the use of localhost as my address... what should I enter per your suggestion of 'address of course'?
John is saying “IP Address” ... (of course).
Autor
Thanks Myron...
I entered my IP address... still didn't work.
Hello David,
Unfortunately we do not provide support for functionalities which are not related to the program like in this case where the support of Toad will be able to help you better.
What I would suggest it to check if you are reaching the database from a local server instead of a folder since the website needs to be running on a webserver to be able to connect to the database.
Many thanks!
Autor
I figured it out!...
HostName must be the IP address of the MySQL DATABASE on the host/server. eg 50.23.134.33 (the HostSite provides this info when you create the MySQL database). DO NOT INCLUDE THE PORT NUMBER ie 50.23.134.33:3309 IS INCORRECT. ALSO... NB! the IP address of the Database will NOT be the same as the IP address of your website.
also... the domain name will not work!
The Database Name: must be exactly the same as the MySQL database name on the server (not the table name)... also... MySQL doesn't like capitals.
Username: (specified when you created the database)
Password: this is where is gets a bit strange... this is NOT the password associated with the MySQL database when you created the database... it is the Password of the MySQL database that is assigned by the HOST. eg you may have assigned a password of 'Fred23X' when you created the database (maybe using TOAD for MySQL)... but when you connected to this database via the HOST the HOST (at least my HOST did this) assigned another password (that does not have to be the password to the database). So 'Fred23X' will work when using TOAD (or other MySQL tools) but not when you are trying to access the Database via the HOST service.
I hope this helps someone... it took a LOT of trialand error!!!