You must have a server running on localhost

Just starting out? Need help? Post your questions and find answers here.
logiciel
New User
New User
Posts: 1
Joined: Wed Jun 12, 2019 12:04 am

You must have a server running on localhost

Post 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
User avatar
bbanelli
Enthusiast
Enthusiast
Posts: 543
Joined: Tue May 28, 2013 10:51 pm
Location: Europe
Contact:

Re: You must have a server running on localhost

Post 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.
"If you lie to the compiler, it will get its revenge."
Henry Spencer
https://www.pci-z.com/
Mindphazer
Enthusiast
Enthusiast
Posts: 340
Joined: Mon Sep 10, 2012 10:41 am
Location: Savoie

Re: You must have a server running on localhost

Post 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.
MacBook Pro 14" M1 Pro - 16 Gb - MacOS 14 - Iphone 15 Pro Max - iPad at home
...and unfortunately... Windows at work...
Post Reply