Let $\mathfrak g$ be a finite dimensional Lie algebra with an invariant, symmetric and non-degenerate bilinear form $\langle \cdot , \cdot \rangle $.

**Claim : $\mathfrak g$ admits only one such a bilinear form if and only if $\mathfrak g $ is either simple or abelian and one dimensional.**

*Proof* : Denote the Levi decomposition of $\mathfrak g$ by $\mathfrak r + \mathfrak s$, then for any $\lambda \in \mathbb R $ the form defined by
$$\langle r_1 + s_1 , r_2 + s_2 \rangle_\lambda = \langle r_1 , r_2 \rangle + \langle s_1 , r_2 \rangle + \langle r_1 , s_2 \rangle +\lambda \langle s_1 , s_2 \rangle $$
Is invariant.
For some $\lambda$ around 1, the form is also definite because it is an open property.

Having only one such form implies that $\mathfrak g$ is either solvable and equal to $\mathfrak r$ or semi-simple and equal to $\mathfrak s$.
We know that in the semi-simple case, only simple ones have only one such form.
Assume from now on, that $\mathfrak g = \mathfrak r$ is solvable.
We write $\mathfrak g = [\mathfrak g , \mathfrak g] + A$ as a direct sum of vector spaces and as before for some $\lambda$ the bilinear form defined by
$$\langle g_1 + a_1 , g_2 + a_2 \rangle_\lambda = \langle g_1 , g_2 \rangle + \langle g_1 , a_2 \rangle + \langle a_1 , g_2 \rangle +\lambda \langle a_1 , a_2 \rangle $$
is symmetric and definite.