how to convert mysql databse to mysqli?

Discussions about the phpBB3 Forum. How to get the best from this powerful script.
Note that there is no official support for phpBB3 here, a place to share more than to ask for.

Moderator: Moderators

how to convert mysql databse to mysqli?

Postby Professional » Fri Aug 14, 2009 11:21 am

hi,after contacting my host support they finally upraded the mysql version from 4 to 5. :D
now i have 2 questions:
1.how can i convertt my data base to mysqli? and will it reduce my data base size?
2.what changes shoud i make to my phpbb files after convert? i think i shoud just change the mysql to mysqli at confi.php.

any other suggestions apreciated. :wink:
انجمن تخصصی نسل جدید موبایل ها-Apple Portal
My Handwritings: Professional Dreams
Every Thing That U Feel,Is Every Thing That I Feel.
User avatar
Professional
PR5
PR5
 
Posts: 550
Joined: Mon Apr 07, 2008 5:41 am
Location: 1/2 of the World

Advertisement

Re: how to convert mysql databse to mysqli?

Postby kemraj » Fri Aug 14, 2009 3:52 pm

I don't know exactly but this is what i did in the config file where you see mysql just add an "i" after it example mysqli
Thats what i'm doing but i don't know about the converting part i would alot like to know about this
kemraj
 
Posts: 42
Joined: Thu Mar 05, 2009 12:58 am

Re: how to convert mysql databse to mysqli?

Postby Professional » Sat Aug 15, 2009 3:54 am

tnx, i found this article but it's not clear for me: :shock:
http://forge.mysql.com/w/index.php?titl ... ntable=yes
انجمن تخصصی نسل جدید موبایل ها-Apple Portal
My Handwritings: Professional Dreams
Every Thing That U Feel,Is Every Thing That I Feel.
User avatar
Professional
PR5
PR5
 
Posts: 550
Joined: Mon Apr 07, 2008 5:41 am
Location: 1/2 of the World

Re: how to convert mysql databse to mysqli?

Postby Typo » Sat Aug 15, 2009 10:19 am

Have a look at this article.

What made you not use 'i' in the first place and why the sudden interest in using it now? Just curious.

Typo
User avatar
Typo
phpBB SEO Team
phpBB SEO Team
 
Posts: 346
Joined: Sun Jan 18, 2009 11:33 am

Re: how to convert mysql databse to mysqli?

Postby Professional » Sat Aug 15, 2009 3:20 pm

tnx but i didn't get what shoud i do exatcly :?
انجمن تخصصی نسل جدید موبایل ها-Apple Portal
My Handwritings: Professional Dreams
Every Thing That U Feel,Is Every Thing That I Feel.
User avatar
Professional
PR5
PR5
 
Posts: 550
Joined: Mon Apr 07, 2008 5:41 am
Location: 1/2 of the World

Re: how to convert mysql databse to mysqli?

Postby Typo » Sat Aug 15, 2009 10:24 pm

You should be just fine by just adding the i in config.php to make it:
Code: Select all
$dbms = 'mysqli';


If it causes you errors, undo it and gimme a hollar.

Typo
User avatar
Typo
phpBB SEO Team
phpBB SEO Team
 
Posts: 346
Joined: Sun Jan 18, 2009 11:33 am

Re: how to convert mysql databse to mysqli?

Postby Professional » Sun Aug 16, 2009 7:03 am

thank u i did it and at ACP for databse now it says MySQL(i) 5.0.81-community-log :D

so shoudn't i do anything else?
انجمن تخصصی نسل جدید موبایل ها-Apple Portal
My Handwritings: Professional Dreams
Every Thing That U Feel,Is Every Thing That I Feel.
User avatar
Professional
PR5
PR5
 
Posts: 550
Joined: Mon Apr 07, 2008 5:41 am
Location: 1/2 of the World

Re: how to convert mysql databse to mysqli?

Postby Typo » Sun Aug 16, 2009 7:18 am

Nope, you don't need to do anything else. Your set.

Come again! :mrgreen:
lol

Typo
User avatar
Typo
phpBB SEO Team
phpBB SEO Team
 
Posts: 346
Joined: Sun Jan 18, 2009 11:33 am

Re: how to convert mysql databse to mysqli?

Postby Professional » Sun Aug 16, 2009 11:55 am

Typo wrote:Nope, you don't need to do anything else. Your set.

Come again! :mrgreen:
lol

Typo

tnx deat typo :D
just one thing when the mysql version was 4 db size was about 640 MB,but after uprade when i repaired it size became 680 MB . i think it automatically added necessary i after mysql sentence.
what is your idea?
انجمن تخصصی نسل جدید موبایل ها-Apple Portal
My Handwritings: Professional Dreams
Every Thing That U Feel,Is Every Thing That I Feel.
User avatar
Professional
PR5
PR5
 
Posts: 550
Joined: Mon Apr 07, 2008 5:41 am
Location: 1/2 of the World

Re: how to convert mysql databse to mysqli?

Postby Typo » Mon Aug 17, 2009 9:57 am

Unrelated. The db will remain unchanged. What you did was change the driver that is used to read it.

Typo
User avatar
Typo
phpBB SEO Team
phpBB SEO Team
 
Posts: 346
Joined: Sun Jan 18, 2009 11:33 am

Re: how to convert mysql databse to mysqli?

Postby wolkenkrieger » Mon Aug 17, 2009 2:17 pm

What is the benefit of mysqli related to phpBB?
wolkenkrieger
PR0
PR0
 
Posts: 77
Joined: Sat Nov 03, 2007 4:49 pm

Re: how to convert mysql databse to mysqli?

Postby Typo » Tue Aug 18, 2009 12:05 am

The benefits of MySQLi are the same no matter the implementation. I think we need to discuss what exactly MySQLi is. So, one of my favorite sites for php and mysql related info is php.net so I went to see what they have for information on the subject. Let's see what they have to say about MySQL and MySQLi.
What is PHP's MySQL Extension?

This is the original extension designed to allow you to develop PHP applications that interact with a MySQL database. The mysql extension provides a procedural interface and is intended for use only with MySQL versions older than 4.1.3. This extension can be used with versions of MySQL 4.1.3 or newer, but not all of the latest MySQL server features will be available.

Note: If you are using MySQL versions 4.1.3 or later it is strongly recommended that you use the mysqli extension instead.

The mysql extension source code is located in the PHP extension directory ext/mysql.

For further information on the mysql extension, see MySQL.

The MySQLi Extension (MySQL Improved) is a relational database driver used in the PHP programming language to provide an interface with MySQL databases. MySQLi is an improved version of the older PHP MySQL driver, offering various benefits[1]. The developers of the PHP programming language recommend using MySQLi when dealing with MySQL server versions 4.1.3 or later[1].

[edit] Technical details

The MySQLi extension provides various benefits with respect to its predecessor, the most prominent of which are (according to [1]):

* An object-oriented interface
* Support for prepared statements
* Support for multiple statements
* Support for transactions
* Enhanced debugging support
* Embedded server support


As a side note you may be interested to know that as of PHP6 MySQL will be dropped completely in favor of MySQLi .

There are a lot of different pages out there with ideas about which is faster and tons of benchmarks that go both ways. In the end I think that MySQLi wins out and the fact is that when it loses, its by milliseconds over thousands of queries, there isn't really that many cases where it makes sense to keep using MySQL.

Typo
User avatar
Typo
phpBB SEO Team
phpBB SEO Team
 
Posts: 346
Joined: Sun Jan 18, 2009 11:33 am

Re: how to convert mysql databse to mysqli?

Postby Professional » Tue Aug 18, 2009 7:06 am

good information, tnx :)
انجمن تخصصی نسل جدید موبایل ها-Apple Portal
My Handwritings: Professional Dreams
Every Thing That U Feel,Is Every Thing That I Feel.
User avatar
Professional
PR5
PR5
 
Posts: 550
Joined: Mon Apr 07, 2008 5:41 am
Location: 1/2 of the World


Return to phpBB Forum

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 84 guests