Mysql connection
#1

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       ""
Reply
#2

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.
Reply
#3

i want to know that i will add the server ip(without port) here?:
Код:
#define host "localhost"
Reply
#4

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.
Reply
#5

how will i make an account in phpmyadmin?
Reply
#6

Quote:
Originally Posted by Fancy
Посмотреть сообщение
how will i make an account in phpmyadmin?
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/
Reply
#7

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?
Reply
#8

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)