WebSite X5Help Center

 
David B.
David B.
User

SQL database Localhost  en

Author: David B.
Visited 3835, Followers 1, Shared 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?

Posted on the
8 ANSWERS - 1 CORRECT
John S.
John S.
User

Using IP should also function

Read more
Posted on the from John S.
John S.
John S.
User

Address of course

Read more
Posted on the from John S.
David B.
David B.
User
Author

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'?

Read more
Posted on the from David B.
Myron A.
Myron A.
User

John is saying “IP Address” ... (of course).

Read more
Posted on the from Myron A.
David B.
David B.
User
Author

Thanks Myron...

I entered my IP address... still didn't work.

Read more
Posted on the from David B.
Incomedia
Claudio D.
Incomedia

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!

Read more
Posted on the from Claudio D.
David B.
David B.
User
Author

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!!!

Read more
Posted on the from David B.