LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   remove variable from mysql (https://www.linuxquestions.org/questions/linux-software-2/remove-variable-from-mysql-4175714850/)

vinmansbrew 07-20-2022 10:23 AM

remove variable from mysql
 
rhel 7.9
mysql8

I need to know how to remove a variable from cmdline.
I don't know if that is the right name for it, and that is partly my problem.

There is a variable called binlog_expire_logs_seconds

I went to modify it, and I typed in binlog_expire_log_seconds

So I left of an s, and now I can't restart mysqld. Says it's unknown. So, I need to remove the variable(or whatever the correct term is). I just don't know the command, since I don't know the correct name, variable or is parameter or some other name! :)

Thanks!

TB0ne 07-20-2022 12:14 PM

Quote:

Originally Posted by vinmansbrew (Post 6368685)
rhel 7.9
mysql8

I need to know how to remove a variable from cmdline.
I don't know if that is the right name for it, and that is partly my problem.

There is a variable called binlog_expire_logs_seconds I went to modify it, and I typed in binlog_expire_log_seconds

So I left of an s, and now I can't restart mysqld. Says it's unknown. So, I need to remove the variable(or whatever the correct term is). I just don't know the command, since I don't know the correct name, variable or is parameter or some other name!

No idea what you're talking about. What command line did you type in, where? What exactly did you do, how?? Because as you posted, it's impossible to figure out what you mean.

computersavvy 07-20-2022 01:21 PM

Quote:

Originally Posted by vinmansbrew (Post 6368685)
There is a variable called binlog_expire_logs_seconds

I went to modify it, and I typed in binlog_expire_log_seconds

So I left of an s, and now I can't restart mysqld. Says it's unknown. So, I need to remove the variable(or whatever the correct term is). I just don't know the command, since I don't know the correct name, variable or is parameter or some other name! :)

Thanks!

Where is this variable? Is it in mysql? In the OS? How did you try and modify it? What command was used? In the OS or when in the mysql environment?

We cannot guess what you did and my skills at mind reading are non-existent. :scratch:

vinmansbrew 07-20-2022 02:08 PM

Well, that's about my ability with mysql!
It was in the mysql, I did this operation:
SET GLOBAL binlog_expire_logs_seconds= and set a time. The problem is I left off the s, at the end of logs.
It generally seems to be called a system variable. I need to remove the variable that is incorrect, binlog_expire_log_seconds

unknown variable 'binlog_expire_log_seconds=1296000'.

vinmansbrew 07-20-2022 02:52 PM

Ah, found where I could correct it. I didn't know it would end of sitting in the my.cnf but I found a clue pointing to it, and there it was. Makes me feel kinda dumb, but I am flying mysql blind.

computersavvy 07-20-2022 03:22 PM

If it was in my.cfg then it would seem to be a mysql variable and not a system variable.

I am glad you are working at using & learning about mysql. Actually using things (and often making mistakes then fixing them) is how I have learned most of my admin skills for linux, apache web server, mysql, AIX, and others. We learn as we do things.

vinmansbrew 07-20-2022 03:54 PM

If nothing else, it caused me to look around and I found a different setting to delete the binlogs after a few days.


All times are GMT -5. The time now is 01:06 AM.