Gitlab CI Unknown MySQL server host 'mysql' (22) - mysql

I am trying to connect to mysql in my CI workflow and to make sure setting up the DB worked I am passing in the echo command.
I get this error.

I can't believe this is'nt written as an Answer in every single question about this topic, and it is an absolutely retarded fix but here it goes.
Add to the script section.
script:
sleep 300
[do other scripts here]
The container is started but the db has'nt had time to be installed yet. Thats why it did not work.

Related

loading the mysql module

I am 85 and trying to keep my brain active by converting a php/mysql page, that i wrote to node.js.
require 'mysql';
I have the nodejs server up and running. it delivers, correctly, an html page i wrote. i 'require fs' and get it but i cannot find a mysql module. when i npm mysql it fails with a warning of deprecation. my question is how can i get 'mysql' installed so that i can 'require' it? is there a 'mysql' module that i can downlod and place in the c:/nodejs/node_modules folder? Naive?
I have been learning node.js for months. Hopefully I can help:
Check your "package.json" in the code editor (VS Code/Atom).
Check whether "mysql" version in "dependencies" or not.
If no, go to terminal, type "npm install mysql".
After completion, it should have included in "dependencies".
Require mysql in your mysql database connection file (Example: const mysql = require("mysql");)
I think it should be working fine already.
You can always remove existing mysql by typing npm remove mysql in the terminal then go back to Step 3 to reinstall it.
Hope it helps. Thanks

Tcl/Tk Shell error running Spawn/bin/bash

I have written several shell scripts with tcl/tk and I run it on the machine with the user group, when I give it to another user with different machine or from another IP it gives error.
Spawn/bin/bash
But if I run it from my machine where I wrote it, it runs correctly.
The header is so defined.
#! / Usr/bin/expect -f
#
Can you tell me that I have not added or am missing so that it can run from any pc and any user?
From the question you have posted, it looks like to me one or more of following issues. Apart from that the real problem looks to me is in /bin/bash. Check manually once in the machine where the problem lies.
First check manually from other machine where the issue is present. Checking is easy.
which expect
expect
spawn /bin/bash
Have you got the error? Also check if there is -
Difference in expect version
Permission issue
Have you considered the scenario where you are prompted for storing RSA key? Relevant in case you are connecting to other machines from the host you are running the program.
Thank,
Mr. Bordoloi

Mysql Service doesnt show but can login and is running

OK something odd and maybe im missing something simple here. I am trying to diagnose a problem I think that max connections are being reached and need to up them. Upon further looking I ran # service --status-all and then I noticed that mysqld was not in the list so I tried service mysqld status which returned mysqld: unrecognized service . but if I run mysql - p MYPASS I am logged in to mysql and can see all my databases as normal. also I log into phpmyadmin just fine all databases are there. Also have several scripts running using 'localhost' and my mysqlusername and pass, and they are running just fine...
So I am not sure why I am not seeing the mysql service, anyone have some idea? or can point me in some direction?
I am using Centos, I did not set this machine up that person is no longer here, I have several other servers running mysql as well and I checked all those all is right.
It sounds like the service has not been registered.
On a working box do;
chkconfig --list mysqld it should return something like;
mysqld 0:off 1:off 2:off 3:on 4:off 5:off 6:off
Now do the same on the box in question - if nothing comes back then you need to chkconfig --add mysqld then re run the above commands to verify its registered, then you should be able to access it via the service manager.

phpmyadmin (wamp) not working anymore

I've played a little with php and data bases a few weeks ago and it worked perfectly. Now, when I tested the same thing again, I realized that it is not runnable anymore. More exactly, when I have to access the data base, I get the following type of notice:
Warning: mysqli_connect() [function.mysqli-connect]: [2002] A connection attempt failed because the connected party did not (trying to connect via tcp://localhost:3306) in E:\wamp\www\test\login.php on line 18
When I try to open http://localhost/phpmyadmin/ I get a blank screen
Please give me the possible explanations
You probably have another application using port 3306, another MySQL running perhaps?
The Possible explanation is
i suspect you have installed and uninstalled wamp? in that case you need to check you driver/etc/.hosts file under system32 ("Google it for exact path") :) and you have to make sure there exist only one value for
127.0.0.1 localhost
As it said above you need to check your running port has already used by another instance by checking
netstat -a and see if 3306 is Listening
Check on windows services that MySQL ,Apache are running or able to run automatically or manually from the service
suggest uninstall properly ==> delete all inside the wamp folder except www --takecare

Django session cleanup gets killed

I tried to cleanup my expired django sessions using ./manage.py cleanup and after hitting enter it seems to be doing something for a few seconds and then all it returns is 'killed'.
I also tried running the mysql shell and navigate to that table and do 'select * from django_sessions;' and I get kicked from the shell and back to bash with the same message: 'killed'.
What is wrong here? How can I debug that?
It seems like something kills long running commands. This is usual sitation on shared hosting. If you are not the owner/administrator of this server, the answer should be given by the actual owner/administrator.
Maybe these answers will help you: Who "Killed" my process and why?