MySQL Question
#1

Hey guys. I've been looking at tutorials and I'm going to try and change from Y_INI to MySQL. Firstly I'd like to ask if it's a good idea and secondly I want to ask whether the MySQL server has to be installed on the VPS that I'm using or if it can be a different MySQL database that uses stuff other than localhost.
Reply
#2

1. Yes INI is not very good when storing/reading data loads of times.
2. If you want good query times it's advised to host it using your own VPS.
Reply
#3

I've also had multiple account bugs, people getting the wrong passwords, people's accounts being mixed up and stuff. Would this fix it?
Reply
#4

If you do it correctly, yes.
Reply
#5

You will lose any data that you have saved with INI. Unless you add it over manually afterwards.
Reply
#6

Quote:
Originally Posted by Gazzy
Посмотреть сообщение
I've also had multiple account bugs, people getting the wrong passwords, people's accounts being mixed up and stuff. Would this fix it?
That's due probably due to you not resetting variables on disconnect.
Reply
#7

Quote:
Originally Posted by VinLoman
Посмотреть сообщение
You will lose any data that you have saved with INI. Unless you add it over manually afterwards.
Or he could make a tool which would insert old accounts in mysql database.
Reply
#8

MySQL is very efficient however it's a different programming language which isn't really easy to understand, I'd recommend SQLite as it has less external vulnerability than MySQL, although there are internal security vulnerabilities that are easy to avoid. if you have the time learn MySQL, if you don't SQLite is the way to go.
Reply
#9

Quote:
Originally Posted by VinLoman
Посмотреть сообщение
You will lose any data that you have saved with INI. Unless you add it over manually afterwards.
I don't know why you are making this assumption that conversion has to be done manually, it doesn't unless all the .ini files use a different format / structure.

You can use regEx or even sometimes a normal replace function - Visual Studio should assist in writing a small program that can do this for all files in a directory.

Though, you should understand that SQL is a completely new language and is different from PAWN - PAWN brings an implementation, it doesn't modify the language.

You shouldn't attempt to convert from an ini system if you don't have sufficient SQL knowledge - especially regarding how to securely format a query and secure a database from exploits. To answer your last question, you do not need to have it running on localhost; the mysql_connect function allows connection to any connectable database address, assuming your firewall accepts it.
Reply
#10

Quote:
Originally Posted by Abagail
Посмотреть сообщение
To answer your last question, you do not need to have it running on localhost; the mysql_connect function allows connection to any connectable database address, assuming your firewall accepts it.
Though, it's recommended always to run MySQL on localhost since remote connections are slower. For conversion, you can use ini->Sql. I've to add that creating an efficient database structure might be a pain at first, so in case if you're converting all the bulk data into a single table, later you'll have to modify it to get the best out of it.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)