How to Launch MySQL shell script - mysql-workbench

I am testing MySQL Workbench as I could gather from the docs one way to launch MySQL from Windows Command Line as per:
http://dev.mysql.com/doc/mysql-windows-excerpt/5.0/en/windows-start-command-line.html is to look for the file installed with MySQL called "mysqld"
Now I could find the .exe file "mysqld", however when I double click it flashes and disappears.
Any idea or suggestions?
I am able to launch MySQL from its own icon, but not from the file above mentioned.
Using workbench 6.1 community

You are totally confusing the MySQL server (which mysqld.exe is) and MySQL Workbench (MySQLWorkbench.exe, another application). The MySQL command line client (which is totally independent of MySQL Workbench) can be started by opening a command window (cmd.exe) and running mysql from there (not mysqld). But as this is independent from MySQL Workbench (which is just another client, even though a much more sophisticated one), you need to call the MySQL Workbench executable if you want to run it. If you do that from a command prompt it will spit out a number of parameters you can use.

Related

Fatal Error. application server could not be contacted

I would like to install PostgreSQL on windows 7. Howver I faced one problem when I am going to launch pgAdmin 4. It shows that "Fatal Error. application server could not be contacted." I tried run as Administrator, deleted file pgAdmin in AppData. Deleted python and in my path. Added PostgreAQL in my path. However due to some reason it shows the above proble. I need your help. Thank you in advance
Here is the solution that worked for me on windows 10:
Delete the pgAdmin folder from AppData C:\Users\%USERNAME%\AppData\Roaming\pgAdmin (Note: AppData is a hidden folder),
Search for "Services" with windows search, scroll down to postgres and click on "stop",
Run pgAdmin as Administrator.
Unistall existing postgresql on your computer.This should uninstall the entire applications associated with postgresql including pgadmin4. Go to your start menu and type in "pgadmin4" to show if you still have associated file.If you see any,trace the location and delete it.
You can now re-install a fresh copy of POSTGRESQL from Enterprisedb which will automatically install pgadmin4 for you. The new installation will prompt you to enter new password. Use a password you can remember since you will always need it to access the database.
I uninstalled my python IDLE and then installed the latest python IDLE. When installed it will give you an option if you should allow all programs including python to have full access to the AppData PATH choose yes and the fatal error will disappear

Is it possible to set notepad++ as a query editor in db2

I have just installed db2 on windows 8.1 and I want to run some queries. Ideally it would be easier using an editor like notepad++ to edit the queries before running them on the db2 command line as opposed to using the db2 command line. How do I set it up?
I tried this link and it did not work for me.
https://www.databasejournal.com/features/db2/article.php/10896_3316861_3/DB2-Command-Line-Processor-Tips-and-Tricks.htm

On NetBeans, my Node.js server does not automatically restart after changes

I've been using Atom, Sublime Text and Code, and all of those would make the server restart after any changes. With Netbens it doesn't happen.
I have two different servers in my project, one for the client and other for API. Simply executing the commands in either my OS's terminal or Netbeans's terminal also doesn't make the server to restart. Tried to look for suggestions but those I found also didn't happen. The solution was to modify the start file in Properties > Run and check the only checkbox it's in there, but nothing.
What's necessary to do in Netbeans to refresh the server automatically after saving any file? And also, how to run two at the same time? Client and API.

How to do remote debugging in Eclipse CDT without running `gdbserver` manually on the target every time?

Before each debugging cycle I have to run gdbserver on remote target (Linux). So I was thinking to make script that would call python program that would connect over ssh and would run gdbserver.
I cant find any options to run command before debug and I also try to change .gdbinit file but I am unable tu run python script whit that. Since I am using crosscompiler I cant to get other gdb whit such support.
You don't need to run Python to invoke an external command from GDB. This (in .gdbinit) should work:
shell ssh remote-host gdbserver :12345 /path/to/binary/on/remote &
target remote remote-host:12345
If you do need more complicated ssh setup and need Python for that, you can certainly get it with
shell python your_script.py
If you can't get any external program called from your gdbinit, I see one way of doing it within Eclipse that might work (I didn't tested) but it is not really straightforward...
Create an External Tool configuration that launches your gdbserver program (Python or whatever command line script)
Create a C/C++ application launcher that launch your application to debug
Create a launch group that will call the two previously configured configurations.
Launch the group in debug mode
Eclipse 4.7.0 can connect to SSH and launch gdbserver automatically with the automatic launcher set when creating a new debug connection, without the need for any custom scripts.
I have explained the setup in great detail at: Remote debugging C++ applications with Eclipse CDT/RSE/RDT

Debug remote PHP CLI scripts

Here is my situation:
I am developing PHP CLI scripts on a distant server using Eclipse IDE with the RSE plugin (allows to edit files directly on the server).
Now I need to debug these scripts in a similar fashion than in Java (break points, show the variables content, ...).
I found something that could do the job: XDebug and PDT (Eclipse plugin). The problem is that when I try to launch the debug mode Eclipse says that there is no PHP debugger on the local machine. I guess it should be installed on the server machine.
I would like to know if it's possible to use PDT and XDebug to debug remote scripts and, if it's the case, how to configure them to do so. If not, I'd like to know if other solutions exist. It seems like XDebug uses TCP so it should be possible to debug remotely. I can change my IDE if necessary.
The server runs Ubuntu 10.04 with php5-cli and the dev machine with eclipse runs Win7 32bit.
Thanks
Yes this is possible, you need to enable xdebug in the remote server's PHP.ini file and make sure that the xdebug port (default 9000) is not blocked by any firewalls.
xdebug's page on setting up remote debugging.
Here is the complete procedure for the people who have the same problem:
First, install RSE by following the instructions on this website: http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse.rse.doc.user/gettingstarted/g1installing.html
Follow the instructions on this HowTo to install XDebug on the server:
http://ubuntuforums.org/showthread.php?t=525257
Install PDT on Eclipse and do the following changes:
- under Windows/Preferences, go under PHP/Debug and change PHP Debugger to XDebug
- under Windows/Preferences, go under PHP/Debug/Installed Debuggers and configure XDebug. Change the field "Accept remote session (JIT)" to "any".
Open the Remote System Explorer perspective, select your scripts directories and create a project from them (Right Click, Create Remote Project). It will now appear in the PHP perspective.
Let Eclipse run and go to the server (e.g. via SSH). Run the script you want to debug. A Window will then appear on Eclipse proposing you to choose with which "local" (remote via RSE in our case) file you want to link the running script to. Normally, the default script proposed should be the correct one, because it is the one running on the server.
You should now have visual debugging with Eclipse for your PHP-CLI scripts!
Do you want to debug while being able to interact with the script on CLI or do you just want to start it and then step through the code? I guess your question is referring to the problem that you can't access the script directly through a URL. If that's your problem, then I guess the easiest solution would be to debug a usual PHP-web-site which requires your script. Then you can launch XDebug with that web-site initially and step into the script through the require/include-statement.
index.php:
<?php require_once("../../../../../dir1/[...]/cliscript.php");
Best regards
Raffael