Login into Mysql without startx

Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I have had install Damn small Linux(DSL) 10 in Virtual Box with MySQL 5. I created already a database with a Table and Data in it. I can access it over the terminal with the following line:
mysql -u dsl
During this, DSL is startes with startx (GUI). But if I start DSL without startx (its not anymore in .bash_profile) I'll get access to DSL over the Terminal (tty1) automatically.
The Problem at this point. If DSL started without startx, its not possible to get access to Mysql by give in the line:
mysql -u dsl
The Screenshot is here:
How its possible to solve this problem.
linux command-line mysql mysql-connection
add a comment |Â
up vote
0
down vote
favorite
I have had install Damn small Linux(DSL) 10 in Virtual Box with MySQL 5. I created already a database with a Table and Data in it. I can access it over the terminal with the following line:
mysql -u dsl
During this, DSL is startes with startx (GUI). But if I start DSL without startx (its not anymore in .bash_profile) I'll get access to DSL over the Terminal (tty1) automatically.
The Problem at this point. If DSL started without startx, its not possible to get access to Mysql by give in the line:
mysql -u dsl
The Screenshot is here:
How its possible to solve this problem.
linux command-line mysql mysql-connection
Not an answer to your question, but these days, VirtualBox+DSL is very often replaceable by a much lighter (and faster to start) Docker container. You'll find containers with MySQL pre-installed and other containers with an admin interface to it.
â xenoid
Dec 7 '17 at 23:06
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have had install Damn small Linux(DSL) 10 in Virtual Box with MySQL 5. I created already a database with a Table and Data in it. I can access it over the terminal with the following line:
mysql -u dsl
During this, DSL is startes with startx (GUI). But if I start DSL without startx (its not anymore in .bash_profile) I'll get access to DSL over the Terminal (tty1) automatically.
The Problem at this point. If DSL started without startx, its not possible to get access to Mysql by give in the line:
mysql -u dsl
The Screenshot is here:
How its possible to solve this problem.
linux command-line mysql mysql-connection
I have had install Damn small Linux(DSL) 10 in Virtual Box with MySQL 5. I created already a database with a Table and Data in it. I can access it over the terminal with the following line:
mysql -u dsl
During this, DSL is startes with startx (GUI). But if I start DSL without startx (its not anymore in .bash_profile) I'll get access to DSL over the Terminal (tty1) automatically.
The Problem at this point. If DSL started without startx, its not possible to get access to Mysql by give in the line:
mysql -u dsl
The Screenshot is here:
How its possible to solve this problem.
linux command-line mysql mysql-connection
asked Dec 7 '17 at 13:10
Doan
63
63
Not an answer to your question, but these days, VirtualBox+DSL is very often replaceable by a much lighter (and faster to start) Docker container. You'll find containers with MySQL pre-installed and other containers with an admin interface to it.
â xenoid
Dec 7 '17 at 23:06
add a comment |Â
Not an answer to your question, but these days, VirtualBox+DSL is very often replaceable by a much lighter (and faster to start) Docker container. You'll find containers with MySQL pre-installed and other containers with an admin interface to it.
â xenoid
Dec 7 '17 at 23:06
Not an answer to your question, but these days, VirtualBox+DSL is very often replaceable by a much lighter (and faster to start) Docker container. You'll find containers with MySQL pre-installed and other containers with an admin interface to it.
â xenoid
Dec 7 '17 at 23:06
Not an answer to your question, but these days, VirtualBox+DSL is very often replaceable by a much lighter (and faster to start) Docker container. You'll find containers with MySQL pre-installed and other containers with an admin interface to it.
â xenoid
Dec 7 '17 at 23:06
add a comment |Â
3 Answers
3
active
oldest
votes
up vote
2
down vote
That looks like a PATH issue. When you type a command name in the terminal like you do when typing mysql, actually the terminal is trying to find it in folder specified in the PATH variable, and I guess that variable doesn't contain the same folder when you're running X and when you are not.
When you are running with X, and you can use mysql, type whereis -b mysql, you should get something like /path/to/mysql or similar.
Then go into your no-X session and type that full path /path/to/mysql -u dsl and it should work.
To make it permanent you have to modify your .bash_profile if you are using bash. Write a line like this : export PATH='/path/to:$PATH and then from the command line . .bash_profile or reconnect yourself.
add a comment |Â
up vote
0
down vote
One possible option is to add
/usr/local/mysql/bin
to your PATH by running
export PATH=$PATH;/usr/local/mysql/bin
else by adding this path to your ~/.bash_profile
But you can also type the whole path to mysql utility
/usr/local/mysql/bin/mysql -u dsl
By default installing Mysql it's not updating by anyway the PATH.
Hope this helps
add a comment |Â
up vote
0
down vote
Assuming you don't need to do it regularly, the easiest way is to invoke mysql with the full path as
/usr/local/mysql/bin/mysql -u dsl
add a comment |Â
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
That looks like a PATH issue. When you type a command name in the terminal like you do when typing mysql, actually the terminal is trying to find it in folder specified in the PATH variable, and I guess that variable doesn't contain the same folder when you're running X and when you are not.
When you are running with X, and you can use mysql, type whereis -b mysql, you should get something like /path/to/mysql or similar.
Then go into your no-X session and type that full path /path/to/mysql -u dsl and it should work.
To make it permanent you have to modify your .bash_profile if you are using bash. Write a line like this : export PATH='/path/to:$PATH and then from the command line . .bash_profile or reconnect yourself.
add a comment |Â
up vote
2
down vote
That looks like a PATH issue. When you type a command name in the terminal like you do when typing mysql, actually the terminal is trying to find it in folder specified in the PATH variable, and I guess that variable doesn't contain the same folder when you're running X and when you are not.
When you are running with X, and you can use mysql, type whereis -b mysql, you should get something like /path/to/mysql or similar.
Then go into your no-X session and type that full path /path/to/mysql -u dsl and it should work.
To make it permanent you have to modify your .bash_profile if you are using bash. Write a line like this : export PATH='/path/to:$PATH and then from the command line . .bash_profile or reconnect yourself.
add a comment |Â
up vote
2
down vote
up vote
2
down vote
That looks like a PATH issue. When you type a command name in the terminal like you do when typing mysql, actually the terminal is trying to find it in folder specified in the PATH variable, and I guess that variable doesn't contain the same folder when you're running X and when you are not.
When you are running with X, and you can use mysql, type whereis -b mysql, you should get something like /path/to/mysql or similar.
Then go into your no-X session and type that full path /path/to/mysql -u dsl and it should work.
To make it permanent you have to modify your .bash_profile if you are using bash. Write a line like this : export PATH='/path/to:$PATH and then from the command line . .bash_profile or reconnect yourself.
That looks like a PATH issue. When you type a command name in the terminal like you do when typing mysql, actually the terminal is trying to find it in folder specified in the PATH variable, and I guess that variable doesn't contain the same folder when you're running X and when you are not.
When you are running with X, and you can use mysql, type whereis -b mysql, you should get something like /path/to/mysql or similar.
Then go into your no-X session and type that full path /path/to/mysql -u dsl and it should work.
To make it permanent you have to modify your .bash_profile if you are using bash. Write a line like this : export PATH='/path/to:$PATH and then from the command line . .bash_profile or reconnect yourself.
answered Dec 7 '17 at 13:32
Pierre-Alain TORET
31617
31617
add a comment |Â
add a comment |Â
up vote
0
down vote
One possible option is to add
/usr/local/mysql/bin
to your PATH by running
export PATH=$PATH;/usr/local/mysql/bin
else by adding this path to your ~/.bash_profile
But you can also type the whole path to mysql utility
/usr/local/mysql/bin/mysql -u dsl
By default installing Mysql it's not updating by anyway the PATH.
Hope this helps
add a comment |Â
up vote
0
down vote
One possible option is to add
/usr/local/mysql/bin
to your PATH by running
export PATH=$PATH;/usr/local/mysql/bin
else by adding this path to your ~/.bash_profile
But you can also type the whole path to mysql utility
/usr/local/mysql/bin/mysql -u dsl
By default installing Mysql it's not updating by anyway the PATH.
Hope this helps
add a comment |Â
up vote
0
down vote
up vote
0
down vote
One possible option is to add
/usr/local/mysql/bin
to your PATH by running
export PATH=$PATH;/usr/local/mysql/bin
else by adding this path to your ~/.bash_profile
But you can also type the whole path to mysql utility
/usr/local/mysql/bin/mysql -u dsl
By default installing Mysql it's not updating by anyway the PATH.
Hope this helps
One possible option is to add
/usr/local/mysql/bin
to your PATH by running
export PATH=$PATH;/usr/local/mysql/bin
else by adding this path to your ~/.bash_profile
But you can also type the whole path to mysql utility
/usr/local/mysql/bin/mysql -u dsl
By default installing Mysql it's not updating by anyway the PATH.
Hope this helps
answered Dec 7 '17 at 13:34
admstg
344
344
add a comment |Â
add a comment |Â
up vote
0
down vote
Assuming you don't need to do it regularly, the easiest way is to invoke mysql with the full path as
/usr/local/mysql/bin/mysql -u dsl
add a comment |Â
up vote
0
down vote
Assuming you don't need to do it regularly, the easiest way is to invoke mysql with the full path as
/usr/local/mysql/bin/mysql -u dsl
add a comment |Â
up vote
0
down vote
up vote
0
down vote
Assuming you don't need to do it regularly, the easiest way is to invoke mysql with the full path as
/usr/local/mysql/bin/mysql -u dsl
Assuming you don't need to do it regularly, the easiest way is to invoke mysql with the full path as
/usr/local/mysql/bin/mysql -u dsl
answered Dec 7 '17 at 22:56
PiedPiper
591210
591210
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f409471%2flogin-into-mysql-without-startx%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Not an answer to your question, but these days, VirtualBox+DSL is very often replaceable by a much lighter (and faster to start) Docker container. You'll find containers with MySQL pre-installed and other containers with an admin interface to it.
â xenoid
Dec 7 '17 at 23:06