PDA

View Full Version : Is there a way to edit something in the SQL database?


XYZ500
07-07-2015, 06:54 PM
This is in reference to this thread: https://vborg.vbsupport.ru/showthread.php?t=319295

I think there is an image link in the SQL database that is preventing the site to display the green SSL in the URL bar.

I need to edit that link from http to https.

Is there a way to find that link in the SQL database and then edit it? Maybe in the phpmyadmin? If anyone knows a way of doing this, please instruct me.

Thank you!

RichieBoy67
07-07-2015, 07:39 PM
To edit the database go into phpadmin.

It would help us help you though if you posted your site link, etc.

XYZ500
07-08-2015, 08:24 AM
I need clear instructions of how to edit the db from phpmyadmin, please.

kh99
07-08-2015, 09:44 AM
Well, if you use a query or a search to find the row, you can just click on the field with the data you want to change and change it right there. But I don't know how to tell you to find what you want. To be honest, I can't think of why any image path couldn't be changed somewhere in the admincp.

XYZ500
07-08-2015, 10:13 AM
Well, if you use a query or a search to find the row, you can just click on the field with the data you want to change and change it right there. But I don't know how to tell you to find what you want. To be honest, I can't think of why any image path couldn't be changed somewhere in the admincp.

I had a few months old SQL database backup on my PC. I opened it on Wordpad and searched for the link and found it there.

Skyrider
07-08-2015, 10:37 AM
Course:

http://support.hostgator.com/articles/specialized-help/technical/phpmyadmin/searching-through-a-mysql-database-in-phpmyadmin

Just search for the word/line you are looking for, and edit the value. The option you are looking for is most likely within the 'setting' table which will show up as results in your search query.

It's advised though to make a database backup before messing with it.

kh99
07-08-2015, 10:42 AM
I had a few months old SQL database backup on my PC. I opened it on Wordpad and searched for the link and found it there. Now I'm thinking, I can take a latest db backup, download it, open it on wordpad, edit the link and make it https, upload it and restore it. But this entire process will take TOO MUCH time (especially the downloading and uploading) as the db size is 1.5GB. Is there any way to find this link in the phpmyadmin like I did on wordpad and edit and save it?

If you found the link in a backup file, then you should be able to figure out what table and column it's in. If you tell us that, we should be able to tell you where you can change it in the admincp. Or at least it would be easier to find where to edit it in phpMyAdmin.

Be careful of what you edit directly in the database. If you edit a text field which is in serialized format you can make it invalid. If at all possible you should have a current backup before making changes.

CAG CheechDogg
07-08-2015, 11:47 AM
ECZ ... you can get to that http link directly from your admin panel ... go to your templates and just type in the any of the following and do a search:

<script type="text/rocketscript">
var pkBaseURL = (("https:" == document.location.protocol) ? "https://yourdomain.com/analytics/piwik/piwik/" : "http://yourdomain.com/analytics/piwik/piwik/");
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
</script><script type="text/rocketscript">
try {
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 1);
piwikTracker.trackPageView();
piwikTracker.enableLinkTracking();
} catch( err ) {}
</script><noscript><p><img src="http://yourdomain.com/analytics/piwik/piwik/piwik.php?idsite=1" style="border:0" alt=""/></p></noscript>

Just type in anything from that script and you should find it in one of the templates my Man ... no need to go into your database at all ...

--------------- Added 1436363339 at 1436363339 ---------------

I would do a search for this:

analytics/piwik/piwik/piwik

and you should have no problem finding it ..

XYZ500
07-08-2015, 05:53 PM
If you found the link in a backup file, then you should be able to figure out what table and column it's in. If you tell us that, we should be able to tell you where you can change it in the admincp. Or at least it would be easier to find where to edit it in phpMyAdmin.

Be careful of what you edit directly in the database. If you edit a text field which is in serialized format you can make it invalid. If at all possible you should have a current backup before making changes.

I'm not sure how to tell you which table or column it is in. I just opened the sql file on wordpad and used the search option to find the link. Sending you a screenshot in the PM showing you what I found in the wordpad.

ECZ ... you can get to that http link directly from your admin panel ... go to your templates and just type in the any of the following and do a search:

<script type="text/rocketscript">
var pkBaseURL = (("https:" == document.location.protocol) ? "https://yourdomain.com/analytics/piwik/piwik/" : "http://yourdomain.com/analytics/piwik/piwik/");
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
</script><script type="text/rocketscript">
try {
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 1);
piwikTracker.trackPageView();
piwikTracker.enableLinkTracking();
} catch( err ) {}
</script><noscript><p><img src="http://yourdomain.com/analytics/piwik/piwik/piwik.php?idsite=1" style="border:0" alt=""/></p></noscript>

Just type in anything from that script and you should find it in one of the templates my Man ... no need to go into your database at all ...

--------------- Added 1436363339 at 1436363339 ---------------

I would do a search for this:

analytics/piwik/piwik/piwik

and you should have no problem finding it ..

I tried searching like this. Didn't find anything. I didn't know Piwik was causing trouble too for SSL. I thought it was just that one image being loaded as http.

kh99
07-08-2015, 06:36 PM
I looked at the image you sent me. That's the "Show Default Post Icon" setting, it's under the "Thread Display Options (showthread)" section, so you should be able to edit it there instead of needing to use phpMyAdmin.

ForceHSS
07-08-2015, 06:37 PM
I connect to my DB with navicat it allow me to edit it in more ways

XYZ500
07-09-2015, 02:45 PM
The problem has been solved.

This thread can be locked now.