I have been running a website from home for a few months now and suddenly phpmyadmin is not showing me all the tables in the mysql database.
Here is a screenshot 1:
I thought the database could be corrupt or maybe someone has executed some bad sql code so I deleted the database and tried to restore from a date that I knew was working and the same thing happened. So I built a new server thinking something in phpmyadmin could be corrupt but now I am facing the same issue on the new server.
I tried manually creating the database but after so many tables have been created the same thing happens.
As you can see in the screenshot 1 on the left side it stops after customcars but then in the middle in continues to downloads. There should be more tables but they will not show up.
I have ran a script to check if they exist and they do but I just cannot access them on phpmyadmin
I have tried importing the database with a .sql file and still no luck.
Sometimes it evan looks like this
Notice the way the customcars on the left is missing and so is the X in the middle for downloads.
My Operating System Is Centos 6,
Mysql Version 5.1.73,
Phpmyadmin 2.11.11.3
Thank you for reading and I hope someone out there has had the same issue so I can fix this asap :)
You might want to check that Settings > Navigation Panel > Maximum items in branch is not set to a low number. http://docs.phpmyadmin.net/en/latest/config.html#cfg_MaxNavigationItems
I had the same issue. I found an eye symbol next to my database name in the left column. When I cliked on the eye symbol I had the option to unhide the missing table. I have no idea how I managed to hide this table but this solved my problem.
You might accidentally hide any table by clicking eye on PhpMyadmin. Click the eye icon then it appears a pop up to show the hidden table.
Related
This is a strange one, but it seems like it should be really easy to solve.
I have a wordpress website Version 4.8.3. PHP 5.6.32.
Whenever I put in a specific value into the title field 6147989800 (or other fields) it get's swapped out on the front end with 8552226270.
I searched in every file on the server for some code (i suspect javascript) that is swapping out the numbers. No luck.
When I search the database the original number 6147989800 is there. But when I do a var_dump of the field is shows 8552226270 and it shows up as 8552226270 on the front end.
This switch happens when I put in 6147989800, 614.798.9800, and 614-798-9800.
I'm at a loss. Even stranger is that when I duplicate the website to a local instance and on a test server the swap doesn't happen.
Any ideas would be great. Thanks!
Thank you John Ellmore for your help. It did end up being a third party Javascript that was doing the phone swap.
I don't know how I missed it [smacks palm against forehead]
I'm currently moving sites from one server to another. In doing this, I'm setting up new dev environment to help test any issues we may have in moving the site.
I've already moved one site, quashing all issues. I've had some issues with the latest two sites.
My work flow normally is:
1) Export
2) Edit to dev URL in Sublime Text via find/replace
3) Import to DB
Importing a MySQL dump first gave me an error such as
"ERROR at line XXX: unknown command YYY"
In one such scenario, this seems to be caused by an encoding issue (STX) for some unknown character.
I can get such errors to go away by using MySQL flags such as:
-default-character-set=latin1 for the mysqldump and NOT using --default-character-set=utf8 with the import.
This gets me further in the process, as things seem to be working, except no images show in Media (just default.png) for the thumbs. I've verified that the files exist on the server and checked permissions. When clicking on an image in Media, I can copy/paste the URL and the image shows properly in a browser.
Another example of where the data isn't fully transferring is that the template used for a page isn't being retained.
I'm at a loss at this point on how to properly export/format/import the MySQL dump. I've even tried the WordPress repair database utility without any change in results.
O. Jones comment mentions a plugin called Duplicator. I didn't utilize this given our situation so I cannot speak to whether or not it would. If that would work correctly, I would imagine that the ideal solution for most.
The solution that I've utilized is simple but may not work for those without access to or unfamiliar with MySQL.
The steps are:
Export via "mysqldump -u {user} -p {databaseName} >
{filename.sql}
Import like usual (without issues)
Log into the new MySQL database where the import was completed, use that database and run the following queries:
UPDATE wp_options SET option_value = replace(option_value, '{oldURL}', '{newURL}');
UPDATE wp_posts SET guid = replace(guid, '{oldURL}', '{newURL}');
UPDATE wp_posts SET post_content = replace(post_content, '{oldURL}', '{newURL}');
UPDATE wp_postmeta SET meta_value = replace(meta_value, '{oldURL}', '{newURL}');
These four queries may need to be run for each variation of "http://oldwebsite.com", "http://www.oldwebsite.com", "https://oldwebsite.com", and "https://www.oldwebsite.com".
I am currently learning laravel with pgsql as the defaut database.
I was reading the laravel tutorial online and I am in the chapter "Working with database".
I copy pasted the code for retrieving records but it doesn't work so I am assuming that it is probably because the tutorial uses MySQL while I'm using postgres.
I modified the code a bit and ended up with these:
StudentController.php
stud_view.php
All I'm getting is a table with headers but it's empty.
I noticed that as I add more tuples in the student table the table being showed by the stud_view is getting bigger but still empty so the Studentontroller must be correct right? The $user->id line of code must then be wrong. Well how do I access the elements then? By the way my student table has attributes name and id only. Thanks for the help.
I realized that my mistake was the filename! I should've saved it as stud_view.blade.php After doing so it worked. I don't understand why though because I thought blade was just used for styling.
I got a problem with the database on Adminer plugin page. Somehow, suddenly, instead Modify field appeared a strange field with the text.
On this example text is where%5BD%5D=Y&where%5BBarCode%5D=9780753827666&where%5BASIN%5D=0753827662&where%5BAuthor%5D=Flynn%2C+Gillian&where%5BTitle%5D=Gone+Girl&where%5BSKU%5D=M456B14-09-10-15-55&where%5BSalesRank%5D=74&where%5BLowestPrice%5D=2.71&where%5BPrice%5D=2.70&where%5BMinPrice1%5D=0.00&where%5BMinPrice2%5D=2.68&where%5BMaxPrice1%5D=2.80&where%5BMaxPrice2%5D=40.00&where%5BOut%5D=FALSE&where%5BSale%5D=TRUE&where%5BForSale%5D=N&where%5BKeep%5D=FALSE&where%5BFees%5D=0.00&where%5BCurrentPrice%5D=2.80&where%5BFNSKU%5D=X000AC2VO9&where%5BCondition%5D=&where%5BQuantity%5D=9
Also, instead of button to select whole result appeared the field with the number 1. This happened to all the tables.
On phpMyAdmin everything is in order. However, on the plugin page I can't use the SQL command, not to mention that I can't check/select the rows.
I\'ve tried to uninstall and re-install the plugin, but the result is the same. I ask for emergency help. I should be grateful for any advice on how to fix it.
I have two virtual systems for development. First one is Windows + xampp (apache, php, mysql) and second one is Linux + apache + php + mysql. I have very very simple page that loads images from database (yes, images are in the database not on the filesystem, it is not the case here, is it right or not) using external links.
The first page shows photos:
<img src="photo.php?photo_id=4" height="127" width="127">
The second page loads them from database:
if (isset($_GET['photo_id'])) {
$link = getDBconnection();
$result = getPhoto($link, $_GET['photo_id']);
if ($result) {
$row = mysql_fetch_assoc($result);
header("Content-type: " . $row['MIMEtype']);
echo $row['photoImage'];
}
closeDBconnection($link);
}
Everything is working fine on the Windows machine but on the linux machine, pictures just don't show up. I mean image files from page directory loads up and shows up but somehow this external link stopped working. I've places few echos and for sure script executes and photoImage has binary data.
I wonder, is it just configuration issue (probable, am not configuring apache/php/mysql every day). I've stuck at that point. Any ideas?
PS. Database is exactly the same. I've just exported/imported it from Windows to Linux mysql database. Any other data is successfully selected from database. It's just the photos, that don't work.
SOLVED
Thanks Marc B for the tip about encoding. I was aware of the possible issue but completely forgot about it. After copying the files once more time to the LINUX machine via ftp, and after double checking that I did not change encoding (by editing any file), the photos showed up.
Some things to check:
Check for database errors - you say the photoImage field has binary data, so not likely, but never ever assume a database call succeeded
Check for early text output, causing the header() call to fail - it should be getting logged somewhere. Turn on display_errors/error_logging while developing, in any case, so you don't have to rummage around in logs to find out what's going wrong.
Hit the url manually in a browser and see what comes through. Perhaps there's some characterset translation going causing the image data to be corrupted (e.g. you're using a TEXT field instead of a BLOB).