Any 4images MySQL Experts here?

krs


Joined
Sep 16, 2008
Messages
3,555
Reaction score
610
Points
113
Location
Canada
I'm currently the admin of a fairly large database, based on 4images MySQL with some custom templates.

The person who created the templates is no longer available.

My problem is that some of the fields where one enters information which is then displayed on the website are not quite long enough.

I thought it would be easy to extend the number of characters that can be entered, say from 30 to 40, but everything I have tried so far has failed.
I thought there would just be a max char (or something like that) number that needs to be changed in the code, but apparently not.

Reading up on this on the net didn't give me any specific answers - I wondered if anyone here is familiar with the 4images code and the custom template arrangement.
 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
15,745
Reaction score
2,071
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
To increase the character limit, you first have to check was the MySQL DB field is set to. If not long enough, you'll have to first increase that and then you can go into the code and remove any restrictions in there.
 
OP
krs

krs


Joined
Sep 16, 2008
Messages
3,555
Reaction score
610
Points
113
Location
Canada
Thanks,
Is increasing the MySQL DB field something I can do or do I need to ask the webhost to do that?

My knowledge of MySQL is pretty much 'zip' -is there any good documentation on line where I can read up on MySQL or a recommended textbook?
 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
15,745
Reaction score
2,071
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
If you have direct access to the DB, then that's what you would use. PHPMyAdmin provides a UI if you wish.

You would use the ALTER MySQL command to change the datatype of the column to make it work. You should make a backup of your DB before making any change.
 
OP
krs

krs


Joined
Sep 16, 2008
Messages
3,555
Reaction score
610
Points
113
Location
Canada
Thanks, I have to think if I should attempt that.

I do have direct access to the database, looked at the phpMyAdmin and a lot in there is not really clear to me what it is.
For instance, when I look at the length of certain entries, it says 3 or 6 cells, but I don't know what the length of a cell is - I assume it must be more than a character ort something totally different.
I'm going to read up a bit on MySQL and decide then if I understand it enough to attempt to extend these fields.
 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
15,745
Reaction score
2,071
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
The other option you have is to go back to the 4images developer and provide feedback about the short length and see if they can do the work.
 
OP
krs

krs


Joined
Sep 16, 2008
Messages
3,555
Reaction score
610
Points
113
Location
Canada
The fields that are a bit too short are all part of the custom template of the 4images site..

But a couple of years back when I could still get a hold of the person who created the custom templates, he told me that somehow there is a basic setting in the DB where the field has to be extended before the extension in the custom template will take hold - like I increase the number of characters in the template HTML code from say 20 to 30, but the DB itself limits the length to 25 so 25 becomes the maximum in the template as well.

The other problem is that this template was created more than ten years ago, the base 4images software (on that site) was never updated since that time but of course the base 4images software has gone through a number of updates but we are concerned if we do update the 4images base to the current version, the template may require changes and in the worst case we loose all the data which is close to 10000 entries.

When I look at backup options of the SQL database on the host website, it essentially says that the backup ends up with the host - I would like to somehow download the complete database to my Mac. Is that not possible?
 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
15,745
Reaction score
2,071
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
Since you have access to the DB and PhpMyAdmin, you can get a full backup following these instructions.
 
OP
krs

krs


Joined
Sep 16, 2008
Messages
3,555
Reaction score
610
Points
113
Location
Canada
Thanks,
Just followed the instructions - that was easy and straight forward.
Previously I went to the backup options on c/panel.

So now I ended up with three files on my Mac:
The 5.9MB one I think is the export following the instructions you posted.
The 43.2MB text Wrangler document opened automatically

and then when I looked around c/panel a bit more I came across a "Backup" option for all the websites in my account and a subfolder called "Download a MySQL Database Backup" which gave me the 34.9MB Document.

So is the 5.9MB file a compressed version of the complete database including images etc.?
And the 34.9MB document the same but not compressed?

Is there any way I can open this downloaded database on my Mac to see what I actually have?
I was surprised how quick the download was for this 10 000 entry dstabase including 10 000 images

gbdb backup.jpg
 
Last edited:

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top