Percona Sever - MySQL packages for aarch64 architecture servers

Hi,

I am trying to setup Percona server for mysql(5.7.25-28) on c6g instance types in aws. The OS is centos 7.9 and the architecture is aarch64.
I am unable to find any packages compatible with this architecture on official download page of percona - Percona Software downloads for databases

Need to know how can I go about installing these percona mysql packages on my arm based centos 7 servers in aws(instance family - c6g ).

1 Like

Hello @Deependra_Saraswat, as you discovered, Percona does not provide precompiled packages for ARM processors. You will need to download the source code and compile for your processor.

1 Like

@matthewb thanks for the prompt reply. Could you please also share the doc for compiling the source code. Will be really helpful.

1 Like

https://dev.mysql.com/doc/mysql-sourcebuild-excerpt/8.0/en/installing-source-distribution.html

1 Like

@matthewb getting below error while running make

[ 30%] Building CXX object storage/innobase/CMakeFiles/innobase.dir/fts/fts0fts.cc.o
/root/percona-server-5.7.25-28/storage/innobase/fts/fts0fts.cc: In function ‘dberr_t fts_sync_index(fts_sync_t*, fts_index_cache_t*)’:
/root/percona-server-5.7.25-28/storage/innobase/fts/fts0fts.cc:4492:1: error: could not split insn
}
^
(insn 740 738 2264 (parallel [
(set (reg:DI 1 x1 [orig:150 D.112694 ] [150])
(plus:DI (mem/v:DI (reg/f:DI 0 x0 [369]) [-1 S8 A64])
(const_int 536870912 [0x20000000])))
(set (mem/v:DI (reg/f:DI 0 x0 [369]) [-1 S8 A64])
(unspec_volatile:DI [
(mem/v:DI (reg/f:DI 0 x0 [369]) [-1 S8 A64])
(const_int 536870912 [0x20000000])
(const_int 5 [0x5])
] UNSPECV_ATOMIC_OP))
(clobber (reg:CC 66 cc))
(clobber (reg:SI 2 x2))
]) /root/percona-server-5.7.25-28/storage/innobase/include/sync0rw.ic:309 1856 {atomic_add_fetchdi}
(expr_list:REG_DEAD (reg/f:DI 0 x0 [369])
(expr_list:REG_UNUSED (reg:CC 66 cc)
(expr_list:REG_UNUSED (reg:SI 2 x2)
(nil)))))
/root/percona-server-5.7.25-28/storage/innobase/fts/fts0fts.cc:4492:1: internal compiler error: in final_scan_insn, at final.c:2897
Please submit a full bug report,
with preprocessed source if appropriate.
See http://bugzilla.redhat.com/bugzilla for instructions.
Preprocessed source stored into /tmp/cczdjjJM.out file, please attach this to your bugreport.
make[2]: *** [storage/innobase/CMakeFiles/innobase.dir/fts/fts0fts.cc.o] Error 1
make[1]: *** [storage/innobase/CMakeFiles/innobase.dir/all] Error 2
make: *** [all] Error 2

1 Like

@Deependra_Saraswat Unfortunately I can’t provide this kind of support here as I’m not a developer. You will need to file a bug report at https://jira.percona.com/ under ‘Percona Server MySQL’ project, or search the web for others attempting this. Perhaps this website can help: https://mysqlonarm.github.io/

1 Like

Even though your question asks about how to compile 5.7 for Centos on an arm processor I was able to get it running on a Ubuntu 20.04 and the steps should be really similar. Be prepared for this to be a bit of a pain, but it can be done. I think that for centos the only difference will be that you might need different libraries, but as you try to compile mysql it will yell at you and tell you which ones you need.

Just as a heads up, my biggest beef with the installation steps and the post installation steps is that they seem very incomplete. They say that you’ll need to install packages depending on your system, but it would be very nice to have a list at the start. Also, I thought the post installation steps were lacking, and missed a whole ton. I had to create a mysql user, group, change data ownership, create the conf file, run mysql in safe mode to create the sock file, kill mysql safe mode, then make sure i’m the mysql user since you can’t run it as root. Then start it, and run the secure installation, and then, then I could finally login.

Anyway, here’s the results of my bash file to setup mysql 5.7, compiled from the git source tree, and then installed on an ubuntu 20.04 instance in aws. This was run on a “r6g.xlarge” instance. You could get by with a r6g.large, but I wouldn’t go any lower since the make steps can take a ton of time.

Just follow these steps, but change apt install to yum install, and this runs you to the end of installing mysql, but I’ve commented out those two steps since we do the rest in ansible. Just uncomment those lines and mysql will likely install for you.

#!/bin/bash -xe
#Note: Make sure you have a beefy enough instance. Otherwise it can take a long time. I used a r6g.xlarge to compile this. 

echo "Building Percona Server 5.7 From Source..."
sudo apt update 
sudo apt install cmake libssl-dev libncurses5-dev libreadline-dev bison libaio-dev build-essential libcurl4-openssl-dev pkg-config

cd /usr/local
git clone https://github.com/percona/percona-server.git 
mv percona-server mysql 
cd mysql
git checkout 5.7
git submodule init
git submodule update

wget "https://sourceforge.net/projects/boost/files/boost/1.59.0/boost_1_59_0.tar.gz"
tar -zxvf boost_1_59_0.tar.gz -C /usr/local/

cmake . -DENABLE_DOWNLOADS=1 -DDOWNLOAD_BOOST=1 -DWITH_BOOST=/usr/local/boost_1_59_0
make dist

cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_CONFIG=mysql_release -DFEATURE_SET=community -DWITH_EMBEDDED_SERVER=OFF

# Create a tar file here that we can use to run the rest of the make and make install steps in Ansible. 
tar czvpf percona-server-5.7.35-38-compiled-full.tar.gz /usr/local/mysql

echo "Finished compressing the compiled build"

#Then you can either take the compiled tgz file, and then send that to ansible for it to untar and then install. 
#Or at this point you could just run "make" and then "make install" from within the "/usr/local/mysql" dir and it would install mysql.  

#To transfer it, you could run a command like this from your local laptop:
# rsync -avprP -e ssh ubuntu@10.200.110.130:/usr/local/mysql/percona-server-5.7.35-38.tar.gz ~

#### To install it locally after running the cmake step with the "-DBUILD_CONFIG=mysql_release" flag then you can run the rest of these commands. 
#### Note, the next "make" command ran for over an hour for me. 
#make
#make install

#and then run all these commands:

# useradd mysql
# sudo usermod -a -G mysql mysql
# sudo usermod -s /bin/bash mysql
# chown -R mysql:mysql /usr/local/mysql/data
# chown -R mysql:mysql error.log/

# cat > /usr/local/mysql/my.cnf << EOL
# [mysqld]
# server-id=10
# port = 3306
# datadir=/usr/local/mysql/data
# log_error = /var/log/mysql_error.log
# EOL

# #create the sock file through running safe mode. 
# bin/mysqld_safe --skip-grant-tables&
# might have to find the mysql process and kill it once the sock file was created
# ps -ef | grep mysql
# get the pid and kill it wil "kill -9 myprocessid" 

# sudo su mysql
# #then start mysql with this command
# /usr/local/mysql/bin/mysqld

# mysql_secure_installation
## enter new password here. 

# mysql -uroot -p
2 Likes