Last answered:

11 Apr 2020

Posted on:

26 Mar 2020

0

How to change appareance in MySQL query editor in order to have a dark screen and different font colors for the keywords, strings, comments, etc?

Hello, I have checked every options under Edit > Preferences menu, I know the option is not there, so I was wondering if there is a more difficult way to do this. Also in the course videos I can see different font colors from the ones I have, Thanks in advance for your help.
8 answers ( 0 marked as helpful)
Instructor
Posted on:

28 Mar 2020

0
Hi Enrique! Thanks for reaching out! There's no universal way of changing the background color of MySQL, unfortunately. Having a dark background depends on your operating system and your version of Workbench. Can you please share these with us to see if we can find a solution.
Please note that finding a solution will not always be possible. Looking forward to your answer.
Best,
The 365 Team  
Posted on:

28 Mar 2020

0
Hello and thanks for your answer, I am currently using windows 7 and Workbench version 8.0.19, I hope this helps. Also, I have read several stack overflow questions, advising to edit a file named code_editor.xml located in the MySQL folder, I managed to find the file, but mine looks quite different from the ones I've seen, so I don't know exactly what to edit in order to change the background and fonts colors. Thanks again for your support.  
Instructor
Posted on:

29 Mar 2020

0
Hi Enrique! Thank you for providing this information. It is indeed quite specific and I hope you will soon find a way to adjust the colors of Workbench as you like. Here's a little help on how to edit this code_editor.xml file. You need to open it as an administrator. This doesn't always mean that you can open it in Notepad and then save the changes you've made. However, if you use a more advanced text editor, such as Notepad++, you can run it as administrator, and then the changes you make on this file will be saved. That said, once you open this file as administrator, you can see it is different from the files you've seen online. What you should be able to do, though, is change the HEX colors, save them according to your preferences, and then once you restart Workbench, observe the changes of the colors. Hope this helps.
Best,
Martin
Posted on:

29 Mar 2020

0
Thanks a lot, I am trying to change the hex colors, but each line has differents styles ids, and I don't know which one to change, I'll try with all them, but it may take a while. If you could guide me I'd really appreciate it, also there is two colors for every style id, that's really confusing.
Instructor
Posted on:

30 Mar 2020

0
Hi Enrique! Yes, it is obviously not a functionality they've thought about while creating the problem, and they've even made it harder for us. So we need to dig into such file to obtain a satisfactory result. Please try changing the back-colors. Hopefully, this well lead to a change in the background color as you prefer (and yest, it does take a while to set up all colors to match your preferences). Hope this will really lead to a change in the colors of your interface but please get back to us if modifying (and saving!) the code_editor.xml file doesn't work. Also, please make sure to restart Workbench after any modification of this *.xml file. Best regards,
Martin
Posted on:

01 Apr 2020

0
Hello Martin, I managed to edit the code_editor.xml file and adjust the colors similar to the solarized dark theme that you use in the R course (whose instructor is my favorite one by the way, totally love her). I wanted to attach a screenshot and my modified file but I don't know how to. So far I haven't been able to edit the current line background or the highlighting of closing parenthesis, which you can see in black in the screenshot, additionally, you can't change the background of other panes, only the query editor pane.    
 
       
Instructor
Posted on:

02 Apr 2020

0
Hi Enrique! Thank you for the kind words and sharing this information with the Community! This is much appreciated! In general, to import Media, you need to press the "Add Media" button first, and then "Insert into post".   Hope this helps.
Best,
Martin
Posted on:

11 Apr 2020

0
Here is the link to the file I modified, and a picture of how it looks, so anyone likes it, you can download it and try it. https://github.com/KikeSenpai/MySQL_Solarized_Dark_Theme.git  

Submit an answer