MySQL

This is used for general discussion that is not necessarily server-related.
Post Reply
lkbr1808
New to forums
New to forums
Posts: 6
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Sat Aug 24, 2013 12:23 pm

MySQL

Post by lkbr1808 »

Hi,
I've been trying to get a MySQL on windows server 03, it goes fine, until I have to run the command line prompt. I try opening it, it pops up for a second and closes again. I have no idea what I should do.
User avatar
Vanderburg
Former staff
Former staff
Posts: 1253
Joined: Sat Nov 13, 2010 7:27 am
Location: Dallas, TX

Re: MySQL

Post by Vanderburg »

How are you attempting to get to the command prompt? If you open the Start menu, then select Run, you can enter "cmd" and submit the dialogue to open the command prompt.
lkbr1808
New to forums
New to forums
Posts: 6
Joined: Sat Aug 24, 2013 12:23 pm

Re: MySQL

Post by lkbr1808 »

Vanderburg wrote:How are you attempting to get to the command prompt? If you open the Start menu, then select Run, you can enter "cmd" and submit the dialogue to open the command prompt.
How do I submit the dialogue?
User avatar
Vanderburg
Former staff
Former staff
Posts: 1253
Joined: Sat Nov 13, 2010 7:27 am
Location: Dallas, TX

Re: MySQL

Post by Vanderburg »

In the Run dialogue window, you would submit it by pressing "OK".
lkbr1808
New to forums
New to forums
Posts: 6
Joined: Sat Aug 24, 2013 12:23 pm

Re: MySQL

Post by lkbr1808 »

Vanderburg wrote:In the Run dialogue window, you would submit it by pressing "OK".
When I try to open the 'MySQL 56 Command Line prompt', it opens and closes so fast I only see it sometimes.
User avatar
Vanderburg
Former staff
Former staff
Posts: 1253
Joined: Sat Nov 13, 2010 7:27 am
Location: Dallas, TX

Re: MySQL

Post by Vanderburg »

This is often because it's simply issuing a command, so it it only opens long enough to do that. You'll likely need to open the full command prompt, as I indicated above, then navigate to MySQL from within that.
lkbr1808
New to forums
New to forums
Posts: 6
Joined: Sat Aug 24, 2013 12:23 pm

Re: MySQL

Post by lkbr1808 »

Vanderburg wrote:This is often because it's simply issuing a command, so it it only opens long enough to do that. You'll likely need to open the full command prompt, as I indicated above, then navigate to MySQL from within that.
How do I navigate to there?
User avatar
soja
This is my homepage
This is my homepage
Posts: 2389
Joined: Fri May 18, 2012 3:20 pm

Re: MySQL

Post by soja »

open a command prompt and use text commands to get to the folder where the program you want to run is located.

For example most cmd prompts start out at
C:/users/username

If I wanted to get to C:/mysq/bin, I would type cd C:/mysql/bin, so the command prompt says I am in that folder. then try to run whatever you are trying to run, for example if it is the mysql exe file, while in C:/mysq/bin just type mysql, and the server will start, and if any errors pop up, they should stay there for you to see.
Not a NFO employee
lkbr1808
New to forums
New to forums
Posts: 6
Joined: Sat Aug 24, 2013 12:23 pm

Re: MySQL

Post by lkbr1808 »

soja wrote:open a command prompt and use text commands to get to the folder where the program you want to run is located.

For example most cmd prompts start out at
C:/users/username

If I wanted to get to C:/mysq/bin, I would type cd C:/mysql/bin, so the command prompt says I am in that folder. then try to run whatever you are trying to run, for example if it is the mysql exe file, while in C:/mysq/bin just type mysql, and the server will start, and if any errors pop up, they should stay there for you to see.
In the command prompt I can navigate to the folder, but when I try to open the file it says "'MySQL' not recognized as an internal or external command, operable program or batch file"
And I found out what it said in the 'MySQL 5.6 Command Line Client' program, it says "Could not open required defaults file: C:\Program Files\MySQL\MySQL Server 5.6\my.ini
Fatal error in defaults handling. Program aborted"
User avatar
soja
This is my homepage
This is my homepage
Posts: 2389
Joined: Fri May 18, 2012 3:20 pm

Re: MySQL

Post by soja »

Did you use a package to install mysql? Such as xampp or wamp? Is the my.ini anywhere on your vds?
Not a NFO employee
.=QUACK=.Major.Pain
This is my homepage
This is my homepage
Posts: 1573
Joined: Sun Jun 26, 2011 8:03 am

Re: MySQL

Post by .=QUACK=.Major.Pain »

Make sure your using .exe when trying to start the mysql if your not already using it.

When using wamp, we use:

Code: Select all

C:\wamp\bin\mysql\mysql5.5.24\bin\mysql.exe
Only thing that might change in that line is if someone is using a different version.

As mentioned above, create yourself a .bat to start it and test.

Try something like:

Code: Select all

@echo off
echo Stopping mysql server...
taskkill /F /IM mysql.exe
ping 127.0.0.1 -n 5 >NUL
echo.
echo.
echo.
echo Start mysql server...
cd /D "C:\wamp\bin\mysql\mysql5.5.24\bin"
start mysql.exe
ping 127.0.0.1 -n 5 >NUL
echo.
echo.
echo.
echo Creating a backup of your database...
FOR /F "tokens=1-4 DELIMS=/ " %%F IN ('date /T') DO (set v_date=%%F%%G%%H) 
FOR /F "tokens=1-4 DELIMS=: " %%F IN ('time /T') DO (set v_time=%%F%%G%%H) 
set fname=database_backup_%v_date%_%v_time%.sql 
echo %v_time% 
echo %fname% 
C:\wamp\bin\mysql\mysql5.5.24\bin\mysqldump -u username -p dbname --password=dbpassword --result-file="C:\\db_backups\%fname%"
ping 127.0.0.1 -n 5 >NUL
echo.
echo.
echo.
echo Leaving the launcher...
ping 127.0.0.1 -n 5 >NUL
echo.
echo.
echo.
exit
Obviously you need to change the locations where the executables are located.
I also included a db backup code I use. You can remove that if you don't want it.

If you want the cmd screen to remain open for troubleshooting, just replace the EXIT with PAUSE.
Visit gspreviews.com And Rate & Review Your Old & Current GSP's
Find Your GSP Coupons at gspreviews.com/coupons/
lkbr1808
New to forums
New to forums
Posts: 6
Joined: Sat Aug 24, 2013 12:23 pm

Re: MySQL

Post by lkbr1808 »

I have no idea what you meant by that.. I am just gonna give up
User avatar
soja
This is my homepage
This is my homepage
Posts: 2389
Joined: Fri May 18, 2012 3:20 pm

Re: MySQL

Post by soja »

Add me on steam if you would like further help: http://steamcommunity.com/id/soja992
Not a NFO employee
Post Reply