I would really appreciate help. I'm new to Linux and Yum. I recently purchased a VPS and it only has MySQL 5.6. I want to update to 5.7 and I'm stuck. pulling hair out over here. I've gotten to the point where i enter command createrepo but there doesn't seem to be any directory created by it as i read there should be. The server is running CentOS 6.9. Here are the steps i followed:
Downloaded Red Hat Enterprise Linux 6 / Oracle Linux 6 (Architecture Independent), RPM Package from https://dev.mysql.com/downloads/repo/yum/ .
Used FTP client to upload the file to my server in a directory called downloads.
in PuTTy went to the downloads folder and typed 'ls', i can see the file is there. it appears in red as "mysql57-community-release-el6-11.noarch.rpm"
typed createrepo /downloads while in the downloads directory and I get:
Spawning worker 0 with 1 pkgs Workers Finished Gathering worker
results
Saving Primary metadata Saving file lists metadata Saving other
metadata Generating sqlite DBs Sqlite DBs complete
ACCORDING to the documentation i read it's supposed to create another directory at this point but when i type ls there is still just the file there. when i run the command again as createrepo /downloads -v i get:
Spawning worker 0 with 1 pkgs
Worker 0: reading mysql57-community-release-el6-11.noarch.rpm
Workers Finished
Gathering worker results
Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs
Starting other db creation: Wed Mar 21 06:30:38 2018
Ending other db creation: Wed Mar 21 06:30:38 2018
Starting filelists db creation: Wed Mar 21 06:30:38 2018
Ending filelists db creation: Wed Mar 21 06:30:38 2018
Starting primary db creation: Wed Mar 21 06:30:38 2018
Ending primary db creation: Wed Mar 21 06:30:38 2018
Sqlite DBs complete
I've also tried localinstall command on the file in the directory with "yum localinstall mysql57-community-release-el6-11.noarch.rpm and i get:
Loading "fastestmirror" plugin
Loading "security" plugin
Loading "universal-hooks" plugin
Config time: 0.033
Yum Version: 3.2.29
Setting up Local Package Process
rpmdb time: 0.000
Examining mysql57-community-release-el6-11.noarch.rpm: mysql57-community-release-el6-11.noarch
Excluding mysql57-community-release-el6-11.noarch
Nothing to do
I think the file may have been installed already kind of inadvertently as i have been struggling with this for hours but then when i call createrepo shouldn't it create the repository using the RPM file?
Thanks for any help!
It may be easier to delete the file you created and use the steps below (Taken from a production box)
The repo uses the name mysql-community-* That's why you couldn't find the package mysql-server via yum
Create a new file /etc/yum.repos.d/mysql-community.repo and add the following;
[mysql-connectors-community]
name=MySQL Connectors Community
baseurl=http://repo.mysql.com/yum/mysql-connectors-community/el/6/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
[mysql-tools-community]
name=MySQL Tools Community
baseurl=http://repo.mysql.com/yum/mysql-tools-community/el/6/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
[mysql57-community]
name=MySQL 5.7 Community Server
baseurl=http://repo.mysql.com/yum/mysql-5.7-community/el/6/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
Then do;
yum clean all
yum upgrade mysql-community-server
Which should install & upgrade you to 5.7 - Remember to run mysql_upgrade after MySQL has restarted.
Related
I have Ubuntu 20.04 and python 3.10.6 on WSL.
I have been trying to install airflow, and am getting 'airflow: command not found' when I'm trying to do 'airflow initdb' or 'airflow info'.
I have done
export AIRFLOW_HOME=~/airflow
and when I run
myname#LAPTOP-28BMMQV7:/root$ ls -l ~/.local/bin
I can see airflow in the list of files.
drwxrwxr-x 2 myname myname 4096 Nov 20 14:17 __pycache__
-rwxrwxr-x 1 myname myname 3472 Nov 20 14:17 activate-global-python-argcomplete
-rwxrwxr-x 1 myname myname 215 Nov 20 14:17 airflow
-rwxrwxr-x 1 myname myname 213 Nov 20 14:17 alembic
when I run this command to see where my python is, I can see this
myname#LAPTOP-28BMMQV7:/root$ ls -l /usr/bin/python*
lrwxrwxrwx 1 root root 10 Aug 18 11:39 /usr/bin/python3 -> python3.10
lrwxrwxrwx 1 root root 17 Aug 18 11:39 /usr/bin/python3-config -> python3.10-config
-rwxr-xr-x 1 root root 5912936 Nov 2 18:53 /usr/bin/python3.10
I also warnings similar to this:
WARNING: The script pygmentize is installed in '/home/myname/.local/bin' which is not on PATH.
So I need to find a way to add this directory to PATH.
I have found the following advice from the airflow documentation,
If the airflow command is not getting recognized (can happen on Windows when using WSL), then ensure that ~/.local/bin is in your PATH environment variable, and add it in if necessary:
PATH=$PATH:~/.local/bin
am not quite sure how to do it?
I also have a MySQL workbench/server 8.0.31 installed and want to connect it to airflow instead of SQLite. can anybody refer me to a good guide on how to install it correctly?
I have run 'pip install 'apache-airflow[mysql]'.
You were so close! I think your local python (and your terminal whenever you tried airflow db init ) was not able to see the airflow you installed on its path.
There is this video series I go to, whenever I need to install Airflow for a fellow coworker.
This video shows how to install Airflow locally. Also, in the second video it shows how to write a DAG.
And more importantly, on the third video it shows how to connect to a different database just like you wanted.
I'm trying to install MySQL(pure) on Arch Linux so I downloaded the following file from https://dev.mysql.com/downloads/mysql/.
mysql-8.0.26-linux-glibc2.17-x86_64-minimal-rebuild.tar.xz
I extracted it and tried to run ./mysql_secure_installation but after I enter the root password I get the following error message:
[rob#archrob bin]$ sudo ./mysql_secure_installation
Securing the MySQL server deployment.
Enter password for user root:
Error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
How can I fix this?
I tried to download it from AUR repository too but when I run the makepkg -si it get a point of the installation it looks like will take forever.
Build files have benn written to /home/rob/mysql/src/build
[0%] Built target INFO_BIN
[0%] built target abi_check
[0%] built target INFO_SRC
[0%] Building CXX object extra/protobuf...
[0%] and so on...
After one hour it was at [22%] so I stopped the installation and tried from the official website.
You'll need to start mariadb before running mysql_secure_installation:
$ sudo systemctl start mariadb.service
I have a new beanstalk that is a migration of an old one running an app under php5.6 platform on Amazon AMI Linux. The new beanstalk is running php7.3 on Amazon Linux2. I have worked through all the migration issues and the app is running correctly on my new beanstalk. I have a load-balancer (classic) and I run autoscaling with the max and min instance settings both set to 1.
The problem occurs when I terminate the ec2. The autoscaling is creating a new ec2 but it is't deploying the application to it.
Does anyone know why this might be, or where I can look to try and debug the issue?
What worked for me was to remove the old .ebextension config files related to cwlogs, and add the line
awslogs: []
to my config that does
packages:
yum:
then create a new conf file as follows
files:
"/tmp/start_aws_cloudwatch_service.sh":
content: |
#!/bin/sh
systemctl start awslogsd
systemctl status awslogsd
systemctl enable awslogsd.service
exit $?
mode : "000755"
owner : root
group : root
commands:
start_aws_cloudwatch_service:
cwd: /tmp
command: bash /tmp/start_aws_cloudwatch_service.sh
After this I could see that the service was up and running
$ systemctl status awslogsd
● awslogsd.service - awslogs daemon
Loaded: loaded (/usr/lib/systemd/system/awslogsd.service; enabled; vendor preset: disabled)
Active: active (running) since Wed 2020-10-14 14:08:19 UTC; 34min ago
Main PID: 4029 (aws)
CGroup: /system.slice/awslogsd.service
└─4029 /usr/bin/python2 -s /usr/bin/aws logs push --config-file /etc/awslogs/awslogs.conf --additional-configs-dir /etc/awslogs/c...
Oct 14 14:08:19 ip-xxx-xxx-30-7.eu-west-1.compute.internal systemd[1]: Started awslogs daemon.
Oct 14 14:08:19 ip-xxx-xxx-30-7.eu-west-1.compute.internal systemd[1]: Starting awslogs daemon...
See: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/QuickStartEC2Instance.html
I've been trying to get gcloud to a usable state on Travis and I just can't seem to get passed the gcloud auth activate-service-account point.
When ever it runs I just get the following error:
ERROR: (gcloud.auth.activate-service-account) PyOpenSSL is not available.
See https://developers.google.com/cloud/sdk/crypto for details.
I've tried apt-get and pip installs both with the export CLOUDSDK_PYTHON_SITEPACKAGES=1 set and nothing seems to work.
Does anyone have any ideas or alternatives?
This is Travis version Ubuntu 14.04.
Update
If I run the command from the docs on travis I get the following error:
usage: gcloud auth activate-service-account ACCOUNT --key-file KEY_FILE [optional flags]
ERROR: (gcloud.auth.activate-service-account) too few arguments
This made me think I had to have an ACCOUNT parameter, but after running the command locally with the un-encrypted service account key, I know it's not needed (unless something has changed).
The only other thing I can think of is that the file isn't be decrypted correctly or the command itself isn't happy in Travis:
- gcloud auth activate-service-account --key-file client-secret.json
Update 2
Just dumped a load of logs to figure what is going on. (Massive shout out to #Vilas for his help)
It looks like gcloud is installed on the VM for node already, but it's a super old version.
$ which gcloud
/usr/bin/gcloud
$ gcloud --version
Google Cloud SDK 0.9.37
bq 2.0.18
bq-nix 2.0.18
compute 2014.11.25
core 2014.11.25
core-nix 2014.11.25
dns 2014.11.25
gcutil 1.16.5
gcutil-nix 1.16.5
gsutil 4.6
gsutil-nix 4.6
sql 2014.11.25
The next question is how can I get the path to find the right gcloud?
I've confirmed that the downloaded SDK installs to ${HOME}/google-cloud-sdk/bin by running this command.
$ ls -l ${HOME}/google-cloud-sdk/bin
total 24
drwxr-xr-x 2 travis travis 4096 Apr 27 21:44 bootstrapping
-rwxr-xr-x 1 travis travis 3107 Mar 28 14:53 bq
-rwxr-xr-x 1 travis travis 912 Apr 21 18:56 dev_appserver.py
-rwxr-xr-x 1 travis travis 3097 Mar 28 14:53 gcloud
-rwxr-xr-x 1 travis travis 3144 Mar 28 14:53 git-credential-gcloud.sh
-rwxr-xr-x 1 travis travis 3143 Mar 28 14:53 gsutil
I finally got a solution for it. Essentially Travis has a super old version of the gcloud SDK installed that was taking presidence over the downloaded SDK.
Steps to Help Diagnose
In your .travis.yml file add:
env:
global:
# Ensure the downloaded SDK is first on the PATH
- PATH=${HOME}/google-cloud-sdk/bin:$PATH
# Ensure the install happens without prompts
- CLOUDSDK_CORE_DISABLE_PROMPTS=1
Then in your install step add the following:
install:
# Make sure SDK is downloaded - cache once it's working
# NOTE: Note sure how to update the SDK if it's cached
- curl https://sdk.cloud.google.com | bash;
# List the SDK contents to ensure it's downloaded
- ls -l ${HOME}/google-cloud-sdk/bin
# Ensure the correct gcloud is being used
- which gcloud
# Print the gcloud version and make sure it's something
# Reasonably up to date compared with:
# https://cloud.google.com/sdk/downloads#versioned
- gcloud --version
I am trying to build mysql rpm, I downloaded the src rpm from mysql (mysl-5.6.26-1.el6.src.rpm) and followed these steps
1. rpm -i MySQL-5.6.26-1.el6.src.rpm
2. cd ~/rpmbuild
3. rpmbuild -v -bb SPECS/mysql.spec
This builds mysql-server-*.rpm, but the binaries and libraries inside the rpm are not stripped. Currently the mysqld and mysqld-debug combined together are more than 100M.
How do I build an rpm with stripped binaries?
Current rpm size
-rw-rw-r--. 1 XXXX XXXXXXX 52M Jul 31 17:43 /home/XXXX/rpmbuild/RPMS/x86_64/MySQL-server-5.6.19-1.linux_glibc.x86_64.rpm