I'm installing MySQL server on my MacBook (M1 Chip). I run the following command to download the MySQL server
sudo docker pull mcr.microsoft.com/mssql/server:2019-latest
Then I run the following command to launch an instance of the Docker I just downloaded:
docker run -d --name sql_server_demo -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=mypassword' -p 1433:1433 mcr.microsoft.com/mssql/server:2019-latest
But it pull a warning
WARNING: The requested image's platform (linux/amd64) does not match
the detected host platform (linux/arm64/v8) and no specific platform
was requested
559ff6b849b6e62cbdbfa3d7cde403f314798bffb4c1622aab8e305d3b49df97
Any one know how to fix this?
Try downloading using mac with apple chip
https://hub.docker.com/editions/community/docker-ce-desktop-mac?tab=description
I managed to solve this by installing mariadb instead of mysql
I'm trying to install gogs on minishift with persistentVolumes.
I did this:
c:\> oc login -u system -p admin
c:\> oc new-project cicd
c:\> oc create -f https://raw.githubusercontent.com/OpenShiftDemos/gogs-openshift-docker/master/openshift/gogs-persistent-template.yaml
from the webconsole I load and execute the imported yaml template and I have gogs and postgresql up and running as you can see in the image below
Unfortunately, when I try to do this first installation of gogs I stuck in this error:
I know the issue is that gogs docker can access in write mode on /etc/gogs/conf/ dir.
How can I solve this on minishift?
thx
fabrizio
I need to archive my MySQL-database every year and I found the Percona Toolkit. But I want to try it on XAMPP first and not on the actual server. I used the Shell from the XAMPP Control Panel.
First, I installed pt-archiver with the command:
wget percona.com/get/pt-archiver --no-check-certificate
The installation was successful. I tried my first dry run:
pt-archiver --source h=127.0.0.1,D=db_ilb,t=erstbegegnung --file 'C:\xampp\Archive\%Y-%m-%d-%D.%t' --where "1=1" --limit 1000 --commit-each --dry-run
and it threw an error:
install_driver(mysql) failed: Attempt to reload DBD/mysql.pm aborted.
Compilation failed in require at (eval 14) line 3.
at ./pt-archiver line 2499.
After trying to install DBD::mysql via CSPAN, another error was thrown:
Warning: No success on command[C:\xampp\perl\bin\perl.exe Makefile.PL]
CPAN: YAML::XS loaded ok (v0.39)
MICHIELB/DBD-mysql-4.041.tar.gz
C:\xampp\perl\bin\perl.exe Makefile.PL -- NOT OK
Running make test
Make had some problems, won't test
Running make install
Make had some problems, won't install
Stopping: 'install' failed for 'DBD::mysql'.
Could not read metadata file. Falling back to other methods to determine prerequisites
I don't know what to do next... If you have any other suggestions for archiving, let me know :)
Getting this error while entering the below command.
[root#localhost mysql-cluster]# ndb_mgmd -f /var/lib/mysql-cluster/config.ini
**-bash: ndb_mgmd: command not found**
I am unable to use the command of ndb_mgmd. Using MySQL 5.6.35 on Centos 7 64-bit
[root#localhost mysql-cluster]# ndb_mgmd -f /var/lib/mysql-cluster/config.ini
-bash: ndb_mgmd: command not found
This is my config.ini
enter image description here
I have previously installed, connected and uploaded to a WordPress MySQL database via SSH no problem. The people who run my server made a few configuration changes, and now I get a "bash: mysql: command not found" error when I try to log into MySQL via the command line on the same server to access the same database.
I am relatively new to all of this, so I am really not sure what to do. When I run "which mysql" I get a message that says there is no MySQL executable in the /usr/bin directories. I can verify that MySQL is running between the fact that my site is still live and functioning and when I ran a command to test MySQL, I got a message that said "MySQL works!"
I find MySQL files in several directories, but I'm not really sure what I am looking for and how I connect to it when I do find it. I am also not sure if this is user error, or if somehow someone moved or hid MySQL from me -- likely user error??
A MySQL server is not a MySQL client.
Check if MySQL is running by executing this command:
ps aux | grep mysql | grep -v grep
And install the MySQL client:
sudo apt-get install mysql-client # Or your distribution command
If you have MySQL server up and running on your server, it does not mean you have a MySQL client installed on this server.
Try
ls -l /usr/bin/mysql*
Do you see MySQL binaries exactly present on system?
One more problem: Linux has very strange behaviour when you run binaries for another architecture.
For example, if you run a 32-bit executable on 64-bit system you will get an error message like "command or file not found", even if the binaries are actually present!
Now mysql-client has changed to default-mysql-client.
Hence the command:
sudo apt-get install default-mysql-client
Although MySQL is running, if you are not able to connect to the server using the mysql command, then you might be missing to provide soft links:
sudo ln -s /usr/local/mysql/bin/mysqladmin /usr/bin
sudo ln -s /usr/local/mysql/bin/mysql /usr/bin
This should enable you to connect.
In order to get MySQL CLI working or to access the mysql command from anywhere, there are a set of steps to be done to add it to the $PATH variable.
First, open a terminal, and run the following command
echo 'export PATH=/usr/local/mysql/bin:$PATH' >> ~/.bash_profile
Then to reload the Bash profile, run
. ~/.bash_profile
Now run,
mysql -u root -p
Enter the password which you gave during installation. You should see the following result:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.23 MySQL Community Server - GPL
You sometimes need to install MySQL on the local machine as well. That means, if you have a host running a MySQL Docker container, the strange thing happened to me that I needed to install mysql-server on the host as well, not only in the container.
The reason was that there was a shell script that needed to check the right database name from a query. In your case, it might be something different. On your host machine (which might even be your local computer, depending the your setup), if on Linux, try:
sudo apt-get update && sudo apt-get install mysql-server
Then you will get rid of
/home/.../some_bash_script.sh: line 123: mysql: command not found