Page 1 of 1

You must have a server running on localhost

Posted: Wed Jun 12, 2019 12:21 am
by logiciel
Good evening

1. I want to know what means this sentence (see subject)
2. I have 2 pc then 2 users who must access the database simultaneously for update data, for that, i have chosen to use MySqlDataBase() (for the first time). Where exactly must I put My DataBase? (please full path and the pc number and why)
3. How to know if i've a server running on localhost ? If not, how to creta it?
4. Finaly, can i see a code example for opening a mysqlDatabase? (Use Mydb.db for the BDD name )
Thank's

Re: You must have a server running on localhost

Posted: Wed Jun 12, 2019 1:17 pm
by bbanelli
In a nutshell, this is not how it works.

MySQL is a client-server database, therefor, you ought to have a server installed somewhere. It can be, as said, installed on localhost, meaning you will be running your client connected to a database locally. You can most certainly find installation for MySQL server for your operating system.

In case you wish to avoid such infrastructure, you could use SQLite, which is also available as a database option in PureBasic. However, some limitations are applicable, especially related to writing. That behavior, or rather difference in it, is a reason why you cannot open a "mydb.db" as a database name using MySQL.

Hope that helped.

Re: You must have a server running on localhost

Posted: Wed Jun 12, 2019 10:40 pm
by Mindphazer
Omega, you already have answers on the french forum.
Localhost = local - host. Hôte local
That means the server hosting your database must be local, the most common is your own PC on which you have PB installed.