Sys_schema in MySQL Workbench missing after clean reinstallation - mysql

I've installed MySQL Workbench on my Macbook, but I have some problems with running scripts and creating databases, so I had to reinstall it. After reinstalling this Workbench, I found out that I am missing sys_schema in my schemas, which should be default there.
Do you know maybe how to install it there, or add it there? Cause now, I can't do anything. If I'm trying to run script, or something it's not working.
Thanks in advance!
Peter

It could be an issue that the schema is still there but the user that you use to connect to MySQL in Workbench lacks the rights to see it.
http://dev.mysql.com/doc/refman/5.7/en/sys-schema.html

Related

How do I restart a MySQL local instance in MySQL workbench?

I've recently gotten into databases for a class I'm currently in, and I need a little bit of help. I've managed to create a database, and even populate a table with data which I was then able to grab from a node.js project I've made in Atom. Wonderful! When I went to shut it down, all seemed normal but now it won't restart. As in, when I'm in the homepage section of MySQL I double click the local instance I made(I can only assume this is opening the connection to the local instance where my database is stored) but it won't start up. I don't know what I'm doing wrong. Here is an image of the error I'm getting. I can only assume it's because the actual server isn't on but I don't know how to turn it on.
Any help is much appreciated!
Thank you!
As according to the users ikiK, P.Salmon, and Y4glory the issue I was having was that I wasn't actually turning on the server. I was able to do so by going through my Window's Services application, finding the MySQL server and starting it there instead of trying to do so through the workbench.
Once again, thank you to those who commented as that was really helpful!!
I have tried every other way mentioned here and other related posts, but it did not solve my problem, the service just wont start, but the below approach with the mysql-installer did.
For this to work you need to have your installer which you have used earlier to install MySql.
Start your windows mysql installer. For me it was "mysql-installer-community-8.0.20.0"
Then remove/uninstall the SQL Server and remove all configurations
Manually delete the SQL Server folder from "C:\Program Files\MySQL\MySQL Server 8.0."
Start your mysql installer again and install the SQL Server again
You can check now that the MySqL Server has started.
Hope it helps someone.

Tables and views keep on fetching in MYSQL

I am fairly new to MYSQL. I just today installed MYSQL on my Windows 10 computer for my personal learning. I installed mySQL workbench 8.0 and created some tables in the database. But the problem I am facing is the tables, views, stored procedures and functions are keep on fetching. I see some solutions online to run a linux command to resolve the problem. But mine is on windows and not sure where and how to execute the command. Can somebody please help me resolving the problem I am facing with MYSQL.
Just restart your MySQL workbench and problem is solve.
I think those files were written in macOS. When it loaded first time in workbench of windows, load then restart the workbench. Then the problem will be solved
Just close MySQL workbench and restart
it works!
its most probably the same as I used when I learned MySQL from youtube. You just need to restart the workbench. This happens because it was originally in mac.
I had the same issue, just close the workbench window and open again, it most of the cases the problem will be solved.

Connecting my MySQL databases to phpMyAdmin

I am running Mac OS 10.10.2. I have recently been educating myself about php and SQL in order to create an online database application for my employer. However, I have been unable to load up my MySQL databases in phpMyAdmin. I have tried following some advice from this forum, but no answers seem to solve my issue.
I installed MySQLWorkbench (Ver. 6.2.4.12437) as well as XAMPP (Ver. 5.6.3-0), and was using phpMyAdmin to have a play around and better understand what I was getting myself into. I then found one of those follow-the-bouncing-ball type teaching websites which advised me to download and install the MySQL community server (Currently running Ver. 5.6.23)
As instructed, I was learning SQL commands through Terminal and built up some databases/tables this way. I decided I wanted to jump into phpMyAdmin where I felt it'd be easier to continue my work. At first XAMPP was unable to turn on the servers which I overcame by uninstalling and reinstalling. Then I was getting a #2002 error when trying to access phpMyAdmin. I tinkered with config files and put in details relating to my localhost MySQL server (Or at least I assume as much).
I was able to get back into phpMyAdmin finally, but my databases made through terminal are not there.
phpMyAdmin shows: cdcol (the example database), information_schema, mysql, performance_schema, phpmyadmin, and test.
If I open terminal and punch in 'mysql' then 'SHOW DATABASES;' it only lists: information_schema.
If I open terminal and punch in 'mysql' with username 'root' and my password, then 'SHOW DATABASES;' it lists: information_schema, mysql, performance_schema, my tutorial/learning database, and my business database. I dropped the test database from here. THESE are what I want to bring up in phpMyAdmin.
I can only guess that I haven't got it configured properly to access this last mysql server, but I can't determine where I am going wrong. If anyone can shed some light on this, that'd be greatly appreciated.
It appears as if you have two MySQL instances; one from the XAMPP and also the MySQL Community Server that you installed yourself.
The "M" of XAMPP is for MySQL, so yes usually it runs its own MySQL server instance. That's sort of the point of the packaged kit, so you don't have to worry about having any of your own applications installed. In theory it should be no problem to stop the XAMPP MySQL instance and instead use your other one, but may require tweaking some configuration files and is probably not supported. If you can make it work, I don't see a reason why it would be a problem, though.
My suggestion is to either use the complete XAMPP stack or roll your own installation rather than mix and match.

How to to fix XAMPP after deleting too many MySQL databases?

I've been stupid enough to delete too many databases in XAMPP with PHPMyAdmin and now my sites on localhost don't run properly anymore. Please see this screenshot of the main errors
I guess entirely reinstalling XAMPP will fix the problem but that might take much more time than necessary. Preferably, I'd like to just reinstall the MySQL component or perhaps recreate/repair some databases required for XAMPP to function properly. However, it looks as if I can only reinstall XAMPP entirely instead of separate components (and if that's correct, it's probably for a reason...).
Do I have a better option here than a complete reinstall of XAMPP?
OK, fixed it with the kind help of scones.
1) By default (XAMPP 1.8.1 on Windows XP), there seems to be a folder C:\xampp\mysql\backup\phpmyadmin. Just copy-paste this entire folder into C:\xampp\mysql\data.
2) Stop and restart MySQL
3) If you're using WordPress, your pages may be blank since it may think there are no themes available. Go to [frontpage url]/wp-admin/. Now just reactivate the theme you'd like to use and all seems up and running again!
You dropped the database for PHPMyAdmin. If you can just restore that (with a command line mysql tool or any tool that does not rely on a web-interface), you can use phpmyadmin again.

running mysql_fix_privilege_tables kills my root password

I am learning mysql and ran into a problem with 'mysql.proc' missing when trying to create a stored procedure. mysql version 5.1.41.
I read that running the script 'mysql_fix_privilege_tables' is supposed to fix the previous error. I am getting a strange side effect... my root password is no longer good anymore when I run this script and can no longer log into mysql because of this. the only solution is to remove mysql and start over. I have done this twice now and have no clue as to why it is affecting my root password. any clues?
Updated 11/28: I found it is a bug in workbench with a particular model sync setting. It is removing the mysql database and for some reason when you do a repair, mysql erases all users. Kind of a perfect storm kind of thing I think.
Maybe this article (geared at Debian Linux running mysql) might help you and save you the pain in having to remove mysql and reinstall again. The principal should remain the same as I have noticed this is tagged with macosx.
Hope this helps,
Best regards,
Tom.