Posts: 160
Threads: 40
Joined: Jul 2015
I am new to mysql
How to connect my script to my database?
I have a server with IP 103.250.80.118:7777
Код:
#define host ""
#define user ""
#define db ""
#define pass ""
Posts: 108
Threads: 49
Joined: Sep 2013
Well you have to provide the mysql hostname so for example my test server is
#define host "localhost" // The SQL host, if its localhost, or whatever its hosted on.
#define user "ucp" // this is the user your mysql account is using.
#define db "root" // this is the name of your database itself.
#define pass "" // Leave Empty if your user has no password.
Posts: 160
Threads: 40
Joined: Jul 2015
i want to know that i will add the server ip(without port) here?:
Код:
#define host "localhost"
Posts: 724
Threads: 14
Joined: Jul 2012
Reputation:
0
The defines just hold the IP/host/DB/password, they're not even needed. You're going to have to use a MySQL plugin if you want to save data using MySQL in your script.
Posts: 160
Threads: 40
Joined: Jul 2015
how will i make an account in phpmyadmin?
Posts: 160
Threads: 40
Joined: Jul 2015
Quote:
Originally Posted by rymax99
What? phpMyAdmin is a front-end database manager, you can use it to manipulate MySQL databases. Keep in mind, SQL - Structured Query Language is a separate language from PAWN and you should learn it before trying to use it within PAWN.
http://www.w3schools.com/sql/
|
i mean what will be the username and pass in phpmyadmin?
Posts: 617
Threads: 6
Joined: Oct 2011
Reputation:
0
These type of questions you are asking are OS based not server based. If you need help with mySQL / phpmyadmin you should go to a software help forum such as a linux help forum which more supporters can help provide you with answers faster and easier.
Anyways to answer your question you create a mysql user and password normally via command line such as
CREATE USER 'serveruser'@'localhost' IDENTIFIED BY 'password';
This means you would login to phpmyadmin with username: serveruser and password: password
You of course would need to link the database and so forth, if you want to learn how to add mysql users and create databases please ****** it there is hundreds of tutorials.